Remove temporary keystore diagnostic step #5
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: Release | |
| on: | |
| push: | |
| tags: | |
| - 'v[0-9]+.[0-9]+.[0-9]+' | |
| concurrency: | |
| group: release-${{ github.ref }} | |
| cancel-in-progress: false | |
| env: | |
| FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true | |
| jobs: | |
| validate: | |
| name: Lint & Test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-java@v4 | |
| with: | |
| distribution: temurin | |
| java-version: 17 | |
| - uses: gradle/actions/setup-gradle@v4 | |
| - name: Lint | |
| run: ./gradlew lint | |
| - name: Unit tests | |
| run: ./gradlew :app:testReleaseUnitTest | |
| release: | |
| name: Build & Publish | |
| needs: validate | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-java@v4 | |
| with: | |
| distribution: temurin | |
| java-version: 17 | |
| - uses: gradle/actions/setup-gradle@v4 | |
| - name: Load secrets from 1Password | |
| uses: 1password/load-secrets-action@v2 | |
| with: | |
| export-env: true | |
| env: | |
| OP_SERVICE_ACCOUNT_TOKEN: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }} | |
| KEYSTORE_BASE64: op://GitHub OSS/Hello Custom Discover Android Signing/keystore_base64 | |
| ANDROID_STORE_PASSWORD: op://GitHub OSS/Hello Custom Discover Android Signing/store_password | |
| ANDROID_KEY_ALIAS: op://GitHub OSS/Hello Custom Discover Android Signing/key_alias | |
| ANDROID_KEY_PASSWORD: op://GitHub OSS/Hello Custom Discover Android Signing/key_password | |
| - name: Decode keystore | |
| run: | | |
| echo "$KEYSTORE_BASE64" | tr -d '[:space:]' | base64 -d > /tmp/keystore.jks | |
| echo "ANDROID_KEYSTORE_PATH=/tmp/keystore.jks" >> "$GITHUB_ENV" | |
| - name: Assemble release APK | |
| env: | |
| GITHUB_REF_NAME: ${{ github.ref_name }} | |
| run: ./gradlew assembleRelease | |
| - name: Rename APK | |
| run: mv app/build/outputs/apk/release/app-release.apk app-${{ github.ref_name }}.apk | |
| - name: Create GitHub Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| files: app-${{ github.ref_name }}.apk | |
| generate_release_notes: true | |
| fail_on_unmatched_files: true | |
| - name: Clean up keystore | |
| if: always() | |
| run: rm -f /tmp/keystore.jks |