-
Notifications
You must be signed in to change notification settings - Fork 4
81 lines (73 loc) · 3.42 KB
/
deploy.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
# written in such a way that it is only need in obbimi/Squore create releases for all brands
name: Publish Released APK to Google
on:
workflow_dispatch: # run manually
inputs:
brand:
description: 'The brand to deploy: Squore/TennisPadel/Tabletennis/Badminton/Racketlon'
default: "Squore"
required: true
type: string
releasePrefix:
description: 'The prefix of the release that is published.'
default: "Release."
required: false
type: string
version:
description: 'The version to deploy: Last 3 digits of versionCode. A release named ${releasePrefix}${version} must exist and publicly accessible for the brand'
default: "526"
required: true
type: string
jobs:
deploy:
runs-on: ubuntu-latest
#strategy:
# matrix:
# apkversion:
# - phoneTabletPost23
# - phoneTabletPre22
steps:
- name: Download from /releases
id: download_apk_extract_info
run: |
set -x
androidhome="${ANDROID_HOME:-${ANDROID_SDK}}"
aaptPath=$(find ${androidhome}/build-tools -name aapt | sort | tail -1)
version=${{ inputs.version }}
brand=${{ inputs.brand }}
releasePrefix=${{ inputs.releasePrefix }}
apkversions="phoneTabletPost23 phoneTabletPre22"
filenames=""
for apkversion in $apkversions; do
echo ${apkversion}
fn=${brand}.${version}-${apkversion}-release-signed.apk
filenames="./${fn},${filenames}"
# download file
wget --quiet -O ${fn} https://github.com/obbimi/${brand}/releases/download/${releasePrefix}${version}/${fn}
# extract info from apk
PKG=$(${aaptPath} d badging ${fn} | grep pack | tr ' ' '\n' | grep -E ^name= | cut -d "'" -f 2)
echo "packageName=$PKG" > $GITHUB_OUTPUT
done
echo "filenames=$filenames" | sed 's~,$~~' > $GITHUB_OUTPUT
ls -l *.apk
# https://github.com/r0adkll/upload-google-play
- name: Publish to google play store 1
uses: r0adkll/[email protected]
with:
serviceAccountJsonPlainText: ${{ secrets.SERVICE_ACCOUNT_JSON }}
packageName: ${{ steps.download_apk_extract_info.outputs.packageName }}
#releaseFiles: ./${{ inputs.brand }}.${{ inputs.version }}-${{ matrix.apkversion }}-release-signed.apk
releaseFiles: ${{ inputs.brand }}.${{ inputs.version }}-phoneTabletPost23-release-signed.apk,${{ inputs.brand }}.${{ inputs.version }}-phoneTabletPre22-release-signed.apk
track: beta # alpha,beta,internal or production
releaseName: ${{ inputs.version }} # if not specified typically derived from versionCode/versionName
#changesNotSentForReview: true # does not seem to work/be allowed anymore
# existingEditId: # A valid, unpublished Edit ID
status: draft
#inAppUpdatePriority: 2
#status: inProgress #Error: Status 'inProgress' requires a 'userFraction' to be set: One of completed, inProgress, halted, draft.
#userFraction: 0.10 # not possible in alpha
#whatsNewDirectory: distribution/whatsnew
#mappingFile: app/build/outputs/mapping/release/mapping.txt
#debugSymbols: app/intermediates/merged_native_libs/release/out/lib
# "Error: The first release on a track cannot be staged"
# Changes are sent for review automatically. The query parameter changesNotSentForReview must not be set.