F-Droid prep, Fastlane metadata, and Android distribution playbook #2
Workflow file for this run
This file contains hidden or 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 Release | |
| on: | |
| push: | |
| tags: | |
| - 'v*' | |
| permissions: | |
| contents: write | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up JDK 17 | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: '17' | |
| distribution: 'temurin' | |
| - name: Decode keystore | |
| run: | | |
| mkdir -p android/GitaVani/keystore | |
| echo "${{ secrets.KEYSTORE_BASE64 }}" | base64 -d > android/GitaVani/keystore/gitavani-release.jks | |
| - name: Create keystore.properties | |
| run: | | |
| cat > android/GitaVani/keystore.properties << EOF | |
| storePassword=${{ secrets.KEYSTORE_PASSWORD }} | |
| keyPassword=${{ secrets.KEY_PASSWORD }} | |
| keyAlias=${{ secrets.KEY_ALIAS }} | |
| storeFile=../keystore/gitavani-release.jks | |
| EOF | |
| - name: Build release APK | |
| working-directory: android/GitaVani | |
| run: ./gradlew assembleRelease | |
| - name: Build release AAB | |
| working-directory: android/GitaVani | |
| run: ./gradlew bundleRelease | |
| - name: Rename artifacts | |
| run: | | |
| VERSION=${GITHUB_REF#refs/tags/v} | |
| cp android/GitaVani/app/build/outputs/apk/release/app-release.apk GitaVani-${VERSION}.apk | |
| cp android/GitaVani/app/build/outputs/bundle/release/app-release.aab GitaVani-${VERSION}.aab | |
| - name: Create GitHub Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| files: | | |
| GitaVani-*.apk | |
| GitaVani-*.aab | |
| generate_release_notes: true | |
| draft: false |