File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3,12 +3,15 @@ name: Build and Sign IIAB APKs
33on :
44 push :
55 branches : [ "main", "master" ]
6+ tags :
7+ - ' v*'
68 workflow_dispatch :
79
810jobs :
911 build :
1012 name : Build Release APKs
1113 runs-on : ubuntu-latest
14+
1215 defaults :
1316 run :
1417 working-directory : ./controller
4447 KEY_PASSWORD : ${{ secrets.KEY_PASSWORD }}
4548 # Run assembleRelease injecting the signature, skipping store.properties
4649 run : |
47- ./gradlew assembleRelease --info \
50+ ./gradlew assembleRelease \
4851 -Pandroid.injected.signing.store.file=$(pwd)/keystore.jks \
4952 -Pandroid.injected.signing.store.password=$KEYSTORE_PASSWORD \
5053 -Pandroid.injected.signing.key.alias=$KEY_ALIAS \
5861 path : controller/**/build/outputs/apk/release/*.apk
5962 retention-days : 7
6063
64+ # Only if this pipeline was triggered by a Tag, we create the Release
65+ - name : Create GitHub Release
66+ if : startsWith(github.ref, 'refs/tags/v')
67+ uses : softprops/action-gh-release@v2
68+ with :
69+ # Automatically marks the version as Pre-release if your tag ends in "-beta" or "-rc"
70+ prerelease : ${{ contains(github.ref, '-beta') || contains(github.ref, '-rc') }}
71+ files : controller/**/build/outputs/apk/release/*.apk
72+ generate_release_notes : true
73+ env :
74+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
75+
6176 - name : Cleanup Keystore
6277 if : always()
6378 run : rm -f keystore.jks
You can’t perform that action at this time.
0 commit comments