Skip to content

Commit

Permalink
workflow to automatically deploy apks
Browse files Browse the repository at this point in the history
  • Loading branch information
hoeveid committed Aug 4, 2024
1 parent f31fc2a commit 98cf7ca
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,16 @@ on:
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'
description: 'The version to deploy: Last 3 digits of versionCode. A release named Release.${version} must exist and publicly accessible for the brand'
default: "526"
required: true
type: string
#releasePrefix:
# description: 'The prefix of the release that is published.'
# default: "Release."
# required: false
# type: string

jobs:
deploy:
Expand All @@ -40,14 +40,14 @@ jobs:
aaptPath=$(find ${androidhome}/build-tools -name aapt | sort | tail -1)
version=${{ inputs.version }}
brand=${{ inputs.brand }}
releasePrefix=${{ inputs.releasePrefix }}
releasePrefix=Release.
apkversions="phoneTabletPost23 phoneTabletPre22"
filenames=""
for apkversion in $apkversions; do
echo ${apkversion}
fn=${brand}.${version}-${apkversion}-release-signed.apk
filenames="./${fn},${filenames}"
filenames="${fn},${filenames}"
# download file
wget --quiet -O ${fn} https://github.com/obbimi/${brand}/releases/download/${releasePrefix}${version}/${fn}
# extract info from apk
Expand All @@ -58,13 +58,13 @@ jobs:
ls -l *.apk
# https://github.com/r0adkll/upload-google-play
- name: Publish to google play store 1
- name: Publish to google play store
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
#releaseFiles: ${{ inputs.brand }}.${{ inputs.version }}-phoneTabletPost23-release-signed.apk,${{ inputs.brand }}.${{ inputs.version }}-phoneTabletPre22-release-signed.apk
releaseFiles: ${{ steps.download_apk_extract_info.filenames }}
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
Expand Down

0 comments on commit 98cf7ca

Please sign in to comment.