Primal 0.97.2 release #116
Workflow file for this run
This file contains 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: | |
- '*' | |
workflow_dispatch: | |
env: | |
ANDROID_PUBLISHER_CREDENTIALS: ${{ secrets.ANDROID_PUBLISHER_CREDENTIALS }} | |
jobs: | |
build: | |
name: Build, sign and upload artifacts | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
cache: '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 }}" | |
- name: Build & Sign APK artifacts | |
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 | |
./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 APK artifacts to GitHub | |
uses: actions/upload-artifact@v3 | |
with: | |
name: primal-${{ github.ref_name }} | |
path: | | |
primal-${{ github.ref_name }}.apk | |
primal-${{ github.ref_name }}-mapping.zip | |
primal-${{ github.ref_name }}-crash-reporter.apk | |
primal-${{ github.ref_name }}-crash-reporter-mapping.zip | |
- name: Publish AAB to Google Play | |
run: ./gradlew publishGooglePlayReleaseBundle --track "alpha" --release-name "${{ github.ref_name }}" | |
release: | |
name: Create GitHub release | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Download artifacts | |
uses: actions/download-artifact@v1 | |
with: | |
name: primal-${{ github.ref_name }} | |
- name: Create Release | |
id: create_release | |
uses: softprops/action-gh-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ github.ref_name }} | |
name: Primal ${{ github.ref_name }} | |
draft: true | |
prerelease: true | |
body_path: app/src/main/github/release-notes/github.md | |
files: primal-${{ github.ref_name }}/* |