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+ timeout-minutes : 45
13+ env :
14+ BUILD_NUMBER : ${{ github.run_number }}
15+
16+ steps :
17+ # Checkout - https://github.com/actions/checkout
18+ - name : Checkout
19+ 20+
21+ # Setup Java - https://github.com/actions/setup-java
22+ - name : Set up JDK 21
23+ 24+ with :
25+ distribution : ' temurin'
26+ java-version : ' 21'
27+ - name : Check JDK version
28+ run : java -version
29+
30+ # Setup Android - https://github.com/android-actions/setup-android
31+ - name : Setup Android SDK
32+ uses :
android-actions/[email protected] 33+
34+ # Decode Keystore
35+ - name : Decode Keystore
36+ env :
37+ RELEASE_KEYSTORE_BASE64 : ${{ secrets.RELEASE_KEYSTORE_BASE64 }}
38+
39+ run : |
40+ echo "$RELEASE_KEYSTORE_BASE64" | base64 --decode > release.jks
41+
42+ # Gradlew Bundle Release
43+ - name : build prod
44+ run : ./gradlew app:bundleRelease
45+ env :
46+ RELEASE_KEY_ALIAS : ${{ secrets.RELEASE_KEY_ALIAS }}
47+ RELEASE_KEY_PASS : ${{ secrets.RELEASE_KEY_PASS }}
48+
49+ - name : Upload
50+ uses : actions/upload-artifact@v2
51+ with :
52+ name : Build Artifacts
53+ path : app/build/outputs/
54+
55+ # Create GitHub release - https://github.com/softprops/action-gh-release
56+ - name : GitHub Release
57+ 58+ with :
59+ name : Twilight ${{ env.GITHUB_REF_NAME }}
60+
61+ # Set VERSION_INFORMATION
62+ - run : echo "VERSION_INFORMATION=$(${{github.workspace}}/gradlew -q printVersionInformation)" >> $GITHUB_ENV
63+ continue-on-error : true
0 commit comments