Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Android Build and Publish on Release | |
on: | |
release: | |
types: [published] | |
paths: | |
- '**/*.apk' | |
jobs: | |
build-and-publish: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Set up JDK | |
uses: actions/setup-java@v1 | |
with: | |
java-version: '17' | |
- name: Build AAB | |
run: | | |
./gradlew clean | |
./gradlew bundleRelease --no-daemon --warning-mode all | |
- name: Sign AAB | |
id: sign_app_aab | |
uses: r0adkll/sign-android-release@v1 | |
with: | |
releaseDirectory: app/build/outputs/bundle/release | |
signingKeyBase64: ${{ secrets.ANDROID_KEYSTORE }} | |
alias: ${{ secrets.ANDROID_KEYSTORE_ALIAS }} | |
keyStorePassword: ${{ secrets.ANDROID_KEYSTORE_PASSWORD }} | |
keyPassword: ${{ secrets.ANDROID_KEY_PASSWORD }} | |
env: | |
BUILD_TOOLS_VERSION: "34.0.0" | |
- name: Copy | |
run: | | |
cp app/build/outputs/bundle/release/app-release.aab app-release.aab | |
- name: Build APK | |
run: | | |
./gradlew clean | |
./gradlew assembleRelease --no-daemon --warning-mode all | |
- name: Sign APK | |
id: sign_app_apk | |
uses: r0adkll/sign-android-release@v1 | |
with: | |
releaseDirectory: app/build/outputs/apk/release | |
signingKeyBase64: ${{ secrets.ANDROID_KEYSTORE }} | |
alias: ${{ secrets.ANDROID_KEYSTORE_ALIAS }} | |
keyStorePassword: ${{ secrets.ANDROID_KEYSTORE_PASSWORD }} | |
keyPassword: ${{ secrets.ANDROID_KEY_PASSWORD }} | |
env: | |
BUILD_TOOLS_VERSION: "34.0.0" | |
- name: Copy | |
run: | | |
cp app/build/outputs/apk/release/app-release-unsigned-signed.apk app-release.apk | |
- name: Create Release | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: | | |
app-release.apk | |
app-release.aab | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |