1+ name : Release
2+
3+ on :
4+ push :
5+ tags :
6+ - ' [0-9]+.[0-9]+'
7+
8+ jobs :
9+ release :
10+ name : Publish on Google Play
11+ runs-on : [ self-hosted, macOS ]
12+ needs : [ cancel-workflow ]
13+ timeout-minutes : 45
14+ env :
15+ BUILD_NUMBER : ${{ github.run_number }}
16+
17+ steps :
18+ # Checkout - https://github.com/actions/checkout
19+ - name : Checkout
20+ 21+
22+ # Setup Java - https://github.com/actions/setup-java
23+ - name : Set up JDK 21
24+ 25+ with :
26+ distribution : ' temurin'
27+ java-version : ' 21'
28+ - name : Check JDK version
29+ run : java -version
30+
31+ # Setup Android - https://github.com/android-actions/setup-android
32+ - name : Setup Android SDK
33+ uses :
android-actions/[email protected] 34+
35+ # Decode Keystore
36+ - name : Decode Keystore
37+ env :
38+ RELEASE_KEYSTORE_BASE64 : ${{ secrets.RELEASE_KEYSTORE_BASE64 }}
39+
40+ run : |
41+ echo RELEASE_KEYSTORE_BASE64 > release.txt
42+ base64 -d release.txt > secrets/release.jks
43+
44+ # Build and deploy - https://github.com/gradle/gradle-build-action
45+ - name : Build and Publish App on Google Play
46+ uses :
gradle/actions/[email protected] 47+ env :
48+ RELEASE_KEY_ALIAS : ${{ secrets.RELEASE_KEY_ALIAS }}
49+ RELEASE_KEY_PASS : ${{ secrets.RELEASE_KEY_PASS }}
50+ with :
51+ gradle-version : wrapper
52+ arguments : publishProdReleaseBundle --stacktrace
53+
54+ # Create GitHub release - https://github.com/softprops/action-gh-release
55+ - name : GitHub Release
56+ 57+ with :
58+ name : Twilight ${{ env.GITHUB_REF_NAME }}
59+
60+ # Set VERSION_INFORMATION
61+ - run : echo "VERSION_INFORMATION=$(${{github.workspace}}/gradlew -q printVersionInformation)" >> $GITHUB_ENV
62+ continue-on-error : true
0 commit comments