Try to fix excessive error popups #496
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: Publishing | |
| on: | |
| push: | |
| branches: | |
| - develop | |
| - hotfix/* | |
| - release/* | |
| tags: | |
| - v*.*.* | |
| jobs: | |
| build: | |
| name: Build | |
| runs-on: ubuntu-24.04 | |
| environment: google-play-store | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| submodules: true | |
| - name: Setup Java | |
| uses: actions/setup-java@v5 | |
| with: | |
| distribution: 'temurin' | |
| java-version: '21' | |
| cache: 'gradle' | |
| - name: Set up keystore | |
| env: | |
| KEYSTORE_B64: ${{ secrets.KEYSTORE_B64 }} | |
| run: echo $KEYSTORE_B64 | base64 --decode > /tmp/fyreplace.keystore | |
| - name: Set up Google services | |
| env: | |
| GOOGLE_SERVICES_B64: ${{ secrets.GOOGLE_SERVICES_B64 }} | |
| run: echo $GOOGLE_SERVICES_B64 | base64 --decode > app/google-services.json | |
| - name: Build app | |
| env: | |
| KEYSTORE_PATH: /tmp/fyreplace.keystore | |
| KEYSTORE_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }} | |
| KEY_ALIAS: ${{ vars.KEY_ALIAS }} | |
| KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }} | |
| SENTRY_DSN: ${{ secrets.SENTRY_DSN }} | |
| SENTRY_ORG: ${{ vars.SENTRY_ORG }} | |
| SENTRY_PROJECT: ${{ vars.SENTRY_PROJECT }} | |
| SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} | |
| run: | | |
| ./gradlew \ | |
| assembleLegacyGoogleRelease \ | |
| assembleLegacyLibreRelease \ | |
| bundleLegacyGoogleRelease \ | |
| bundleLegacyLibreRelease | |
| - name: Upload Google APK | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: Fyreplace.google.apk | |
| path: app/build/outputs/apk/legacyGoogle/release/app-legacy-google-release.apk | |
| if-no-files-found: error | |
| - name: Upload Libre APK | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: Fyreplace.libre.apk | |
| path: app/build/outputs/apk/legacyLibre/release/app-legacy-libre-release.apk | |
| if-no-files-found: error | |
| - name: Upload Google AAB | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: Fyreplace.google.aab | |
| path: app/build/outputs/bundle/legacyGoogleRelease/app-legacy-google-release.aab | |
| if-no-files-found: error | |
| - name: Upload Libre AAB | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: Fyreplace.libre.aab | |
| path: app/build/outputs/bundle/legacyLibreRelease/app-legacy-libre-release.aab | |
| if-no-files-found: error | |
| test: | |
| name: Test | |
| runs-on: ubuntu-24.04 | |
| environment: google-play-store | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| submodules: true | |
| - name: Setup Java | |
| uses: actions/setup-java@v5 | |
| with: | |
| distribution: 'temurin' | |
| java-version: '21' | |
| cache: 'gradle' | |
| - name: Set up Google services | |
| env: | |
| GOOGLE_SERVICES_B64: ${{ secrets.GOOGLE_SERVICES_DEBUG_B64 }} | |
| run: echo $GOOGLE_SERVICES_B64 | base64 --decode > app/google-services.json | |
| - name: Run tests | |
| run: ./gradlew assembleNextGoogleDebug test | |
| publish: | |
| name: Publish | |
| needs: | |
| - build | |
| - test | |
| runs-on: ubuntu-24.04 | |
| environment: google-play-store | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| submodules: true | |
| - name: Set up artifact directory | |
| run: mkdir -p build | |
| - name: Download Google AAB | |
| uses: actions/download-artifact@v7 | |
| with: | |
| name: Fyreplace.google.aab | |
| path: build | |
| - name: Set up Google service account | |
| env: | |
| GCLOUD_SERVICE_ACCOUNT_CREDENTIALS_B64: ${{ secrets.GCLOUD_SERVICE_ACCOUNT_CREDENTIALS_B64 }} | |
| run: echo $GCLOUD_SERVICE_ACCOUNT_CREDENTIALS_B64 | base64 --decode > build/google-service-account.json | |
| - name: Upload AAB to Google Play | |
| run: | | |
| case "${{ github.ref_name }}" in | |
| v*.*.*) | |
| export track=beta;; | |
| hotfix/*) | |
| export track=beta;; | |
| *) | |
| export track=internal;; | |
| esac | |
| fastlane supply \ | |
| --track $track \ | |
| --changes_not_sent_for_review true \ | |
| --json_key build/google-service-account.json \ | |
| --aab build/*.aab \ | |
| --package_name ${{ vars.PACKAGE_NAME }} |