-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
69 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: 'play-console-upload' | ||
description: 'Upload APK to Play Console' | ||
author: 'Konstantin Aksenov' | ||
branding: | ||
icon: 'upload' | ||
color: 'blue' | ||
inputs: | ||
path-to-apk: | ||
description: 'Path to apk' | ||
required: true | ||
version-code: | ||
description: 'Version code' | ||
required: true | ||
path-to-mapping: | ||
description: 'Path to deobfuscation mapping file' | ||
required: false | ||
track: | ||
description: 'Target track' | ||
required: false | ||
default: 'internal' | ||
changes-not-sent-for-review: | ||
description: 'Do not send changes for review' | ||
required: false | ||
default: 'false' | ||
|
||
runs: | ||
using: 'docker' | ||
image: 'github-action/Dockerfile' | ||
args: | ||
- ${{ inputs.path-to-apk }} | ||
- ${{ inputs.version-code }} | ||
- ${{ inputs.path-to-mapping }} | ||
- ${{ inputs.track }} | ||
- ${{ inputs.changes-not-sent-for-review }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
FROM ghcr.io/vacxe/google-play-cli:0.3.9 | ||
|
||
COPY entrypoint.sh /entrypoint.sh | ||
|
||
RUN chmod +x /entrypoint.sh | ||
|
||
ENTRYPOINT ["/entrypoint.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#! /bin/bash | ||
|
||
set -e | ||
|
||
path_to_apk=$1 | ||
version_code=$2 | ||
path_to_mapping=$3 | ||
track=$4 | ||
changesNotSentForReview=$5 | ||
|
||
echo "Play console version:" | ||
google-play-cli version | ||
|
||
edit_id=$(google-play-cli edit create) | ||
echo "Edit id created: $edit_id" | ||
echo "Upload APK..." | ||
google-play-cli apk upload --edit-id $edit_id --apk "$path_to_apk" | ||
echo "Update track..." | ||
google-play-cli tracks update --edit-id $edit_id --track $track --apk-version-code $version_code | ||
echo "Upload deobfuscation files..." | ||
google-play-cli deobfuscation-files upload --edit-id $edit_id --deobfuscation "$path_to_mapping" --apk-version-code $apk_version_code | ||
echo "Validate..." | ||
google-play-cli edit validate --edit-id $edit_id | ||
echo "Commit..." | ||
google-play-cli edit commit --edit-id $edit_id --parameters "{\"changesNotSentForReview\": $changesNotSentForReview}" | ||
|
||
exit 0 | ||
|