1+ name : Release a new version
2+
3+ on :
4+ push :
5+ tags :
6+ - ' v*'
7+
8+ jobs :
9+ release :
10+ runs-on : ubuntu-latest
11+ permissions :
12+ contents : write
13+
14+ steps :
15+ - uses : actions/checkout@v4
16+ with :
17+ fetch-depth : 0
18+
19+ - name : Validate Gradle Wrapper
20+ uses : gradle/wrapper-validation-action@v2
21+
22+ - name : set up JDK 17
23+ uses : actions/setup-java@v4
24+ with :
25+ java-version : ' 17'
26+ distribution : ' temurin'
27+ cache : gradle
28+
29+ - name : Setup Gradle
30+ uses : gradle/gradle-build-action@v3
31+
32+ - name : Grant execute permission for gradlew
33+ run : chmod +x gradlew
34+
35+ - name : Build changelog
36+ id : build_changelog
37+ uses : mikepenz/release-changelog-builder-action@v4
38+ with :
39+ configuration : " changelog_config.json"
40+ env :
41+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
42+
43+ - name : Configure Keystore
44+ shell : bash
45+ run : |
46+ echo '${{ secrets.KEYSTORE_FILE }}' | base64 -d > ./app/podcaster_keystore.jks
47+ echo "storeFile=./podcaster_keystore.jks" >> keystore.properties
48+ echo "keyAlias=$KEYSTORE_KEY_ALIAS" >> keystore.properties
49+ echo "storePassword=$KEYSTORE_STORE_PASSWORD" >> keystore.properties
50+ echo "keyPassword=$KEYSTORE_KEY_PASSWORD" >> keystore.properties
51+ env :
52+ KEYSTORE_KEY_ALIAS : ${{ secrets.KEY_ALIAS }}
53+ KEYSTORE_KEY_PASSWORD : ${{ secrets.STORE_KEY_PASSWORD }}
54+ KEYSTORE_STORE_PASSWORD : ${{ secrets.STORE_KEY_PASSWORD }}
55+
56+ - name : Build & Publish Release (.aab) bundle to Play console
57+ run : ./gradlew bundleRelease publishReleaseBundle
58+ env :
59+ ANDROID_PUBLISHER_CREDENTIALS : ${{ secrets.ANDROID_PUBLISHER_CREDENTIALS }}
60+
61+ - name : Build release APK
62+ run : ./gradlew assembleRelease --stacktrace
63+
64+ - name : Upload release APK
65+ uses : actions/upload-artifact@v4
66+ with :
67+ name : app-release
68+ path : ./app/build/outputs/apk/release/app-release.apk
69+
70+ - uses : ncipollo/release-action@v1
71+ with :
72+ artifacts : " ./app/build/outputs/apk/release/app-release.apk"
73+ body : ${{ steps.build_changelog.outputs.changelog }}
0 commit comments