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: Build & Sign FDroid APK on Release | |
| on: | |
| release: | |
| types: [published] | |
| env: | |
| ANDROID_KEYSTORE_PASSWORD: ${{ secrets.ANDROID_KEYSTORE_PASSWORD }} | |
| ANDROID_KEY_ALIAS: ${{ secrets.ANDROID_KEY_ALIAS }} | |
| ANDROID_KEY_PASSWORD: ${{ secrets.ANDROID_KEY_PASSWORD }} | |
| ANDROID_KEYSTORE_BASE64: ${{ secrets.ANDROID_KEYSTORE_BASE64 }} | |
| jobs: | |
| build-fdroid: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup FVM | |
| uses: kuhnroyal/flutter-fvm-config-action/config@v3 | |
| id: fvm-config-action | |
| - name: Setup Flutter | |
| uses: subosito/flutter-action@v2 | |
| with: | |
| flutter-version: ${{ steps.fvm-config-action.outputs.FLUTTER_VERSION }} | |
| channel: stable | |
| - name: Install dependencies | |
| run: flutter pub get | |
| - name: Run build_runner | |
| run: | | |
| dart run build_runner build --delete-conflicting-outputs | |
| - name: Dump keystore | |
| uses: timheuer/base64-to-file@v1.2.4 | |
| with: | |
| fileName: keystore.jks | |
| fileDir: android/app | |
| encodedString: ${{ secrets.ANDROID_KEYSTORE_BASE64 }} | |
| - name: Create key.properties | |
| run: | | |
| cat > android/key.properties <<EOF | |
| storeFile=keystore.jks | |
| storePassword=${ANDROID_KEYSTORE_PASSWORD} | |
| keyAlias=${ANDROID_KEY_ALIAS} | |
| keyPassword=${ANDROID_KEY_PASSWORD} | |
| EOF | |
| - name: Build FDroid APK (arm64) | |
| run: | | |
| flutter build apk --release --flavor fdroid --split-per-abi \ | |
| --target-platform android-arm64 | |
| - name: Rename APK | |
| run: | | |
| mv build/app/outputs/flutter-apk/app-arm64-v8a-fdroid-release.apk \ | |
| sossoldi-${{ github.event.release.tag_name }}-arm64.apk | |
| - name: Upload to Release | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| files: sossoldi-${{ github.event.release.tag_name }}-arm64.apk | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |