Primal 3.5.25 release #378
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: Create release from tag | |
| on: | |
| push: | |
| tags: | |
| - '*' | |
| - '!ios-*' | |
| workflow_dispatch: | |
| jobs: | |
| build-apk: | |
| name: Build & sign APK | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up JDK 21 | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: '21' | |
| distribution: 'temurin' | |
| - name: Cache gradle | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.gradle/caches | |
| key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }} | |
| restore-keys: | | |
| ${{ runner.os }}-gradle- | |
| - name: Unpack secrets | |
| run: | | |
| openssl base64 -d -out config.properties <<< "${{ secrets.CONFIG_PROPERTIES }}" | |
| openssl base64 -d -out app/primal_alternative_android.jks <<< "${{ secrets.CERT_ALTERNATIVE }}" | |
| openssl base64 -d -out app/primal_googlePlay_android.jks <<< "${{ secrets.CERT_PLAYSTORE }}" | |
| openssl base64 -d -out app/src/aosp/google-services.json <<< "${{ secrets.GOOGLE_SERVICES_FLAVOR_AOSP }}" | |
| openssl base64 -d -out app/src/google/google-services.json <<< "${{ secrets.GOOGLE_SERVICES_FLAVOR_GOOGLE }}" | |
| - name: Build & Sign APK | |
| run: | | |
| ./gradlew assembleAospAltRelease --no-daemon | |
| mv app/build/outputs/apk/aosp/altRelease/*apk primal-${{ github.ref_name }}.apk | |
| zip -j primal-${{ github.ref_name }}-mapping.zip app/build/outputs/mapping/aospAltRelease/mapping.txt | |
| - name: Upload APK artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: apk-release | |
| path: | | |
| primal-${{ github.ref_name }}.apk | |
| primal-${{ github.ref_name }}-mapping.zip | |
| build-apk-crash-reporter: | |
| name: Build & sign crash reporter APK | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up JDK 21 | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: '21' | |
| distribution: 'temurin' | |
| - name: Cache gradle | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.gradle/caches | |
| key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }} | |
| restore-keys: | | |
| ${{ runner.os }}-gradle- | |
| - name: Unpack secrets | |
| run: | | |
| openssl base64 -d -out config.properties <<< "${{ secrets.CONFIG_PROPERTIES }}" | |
| openssl base64 -d -out app/primal_alternative_android.jks <<< "${{ secrets.CERT_ALTERNATIVE }}" | |
| openssl base64 -d -out app/primal_googlePlay_android.jks <<< "${{ secrets.CERT_PLAYSTORE }}" | |
| openssl base64 -d -out app/src/aosp/google-services.json <<< "${{ secrets.GOOGLE_SERVICES_FLAVOR_AOSP }}" | |
| openssl base64 -d -out app/src/google/google-services.json <<< "${{ secrets.GOOGLE_SERVICES_FLAVOR_GOOGLE }}" | |
| - name: Build & Sign crash reporter APK | |
| run: | | |
| ./gradlew assembleAospAltRelease -P enablePrimalCrashReporter=true --no-daemon | |
| mv app/build/outputs/apk/aosp/altRelease/*apk primal-${{ github.ref_name }}-crash-reporter.apk | |
| zip -j primal-${{ github.ref_name }}-crash-reporter-mapping.zip app/build/outputs/mapping/aospAltRelease/mapping.txt | |
| - name: Upload crash reporter APK artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: apk-crash-reporter | |
| path: | | |
| primal-${{ github.ref_name }}-crash-reporter.apk | |
| primal-${{ github.ref_name }}-crash-reporter-mapping.zip | |
| publish-google-play: | |
| name: Publish AAB to Google Play | |
| runs-on: ubuntu-latest | |
| env: | |
| ANDROID_PUBLISHER_CREDENTIALS: ${{ secrets.ANDROID_PUBLISHER_CREDENTIALS }} | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up JDK 21 | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: '21' | |
| distribution: 'temurin' | |
| - name: Cache gradle | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.gradle/caches | |
| key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }} | |
| restore-keys: | | |
| ${{ runner.os }}-gradle- | |
| - name: Unpack secrets | |
| run: | | |
| openssl base64 -d -out config.properties <<< "${{ secrets.CONFIG_PROPERTIES }}" | |
| openssl base64 -d -out app/primal_alternative_android.jks <<< "${{ secrets.CERT_ALTERNATIVE }}" | |
| openssl base64 -d -out app/primal_googlePlay_android.jks <<< "${{ secrets.CERT_PLAYSTORE }}" | |
| openssl base64 -d -out app/src/aosp/google-services.json <<< "${{ secrets.GOOGLE_SERVICES_FLAVOR_AOSP }}" | |
| openssl base64 -d -out app/src/google/google-services.json <<< "${{ secrets.GOOGLE_SERVICES_FLAVOR_GOOGLE }}" | |
| - name: Publish AAB to Google Play | |
| run: ./gradlew publishGooglePlayReleaseBundle --track "internal" --release-name "${{ github.ref_name }}" | |
| release: | |
| name: Create GitHub release | |
| needs: [build-apk, build-apk-crash-reporter] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Download APK artifact | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: apk-release | |
| - name: Download crash reporter APK artifact | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: apk-crash-reporter | |
| - name: Create Release | |
| id: create_release | |
| uses: softprops/action-gh-release@v2 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| tag_name: ${{ github.ref_name }} | |
| name: Primal ${{ github.ref_name }} | |
| draft: true | |
| prerelease: false | |
| body_path: app/src/main/github/release-notes/github.md | |
| files: primal-${{ github.ref_name }}* |