ci: Start creating the build / sign / upload-to-Google-Play pipeline (#50)

This action should build the APK and AAB, sign them, and store the APK
as an asset.

Uploading to the correct Google Play release track will come later.
This commit is contained in:
Nik Clayton 2023-09-15 22:15:50 +02:00 committed by GitHub
parent f4e14dcf44
commit 2c5c93e33a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 65 additions and 0 deletions

View File

@ -0,0 +1,65 @@
name: Upload blueRelease to Google Play
on:
workflow_dispatch:
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
- name: Gradle Wrapper Validation
uses: gradle/wrapper-validation-action@v1
- name: Copy CI gradle.properties
run: mkdir -p ~/.gradle ; cp .github/ci-gradle.properties ~/.gradle/gradle.properties
- name: Gradle Build Action
uses: gradle/gradle-build-action@v2
with:
cache-read-only: ${{ github.ref != 'refs/heads/main' && github.ref != 'refs/heads/develop' }}
- name: Build APK
run: ./gradlew assembleBlueRelease --stacktrace
- name: Build AAB
run: ./gradlew :app:bundleBlueRelease --stacktrace
- uses: r0adkll/sign-android-release@v1.0.4
name: Sign app APK
id: sign_app_apk
with:
releaseDirectory: app/build/outputs/apk/blue/release
signingKeyBase64: ${{ secrets.SIGNING_KEY }}
alias: ${{ secrets.SIGNING_KEY_ALIAS }}
keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }}
keyPassword: ${{ secrets.KEY_PASSWORD }}
env:
BUILD_TOOLS_VERSION: "34.0.0"
- uses: r0adkll/sign-android-release@v1.0.4
name: Sign app AAB
id: sign_app_aab
with:
releaseDirectory: app/build/outputs/bundle/blueRelease
signingKeyBase64: ${{ secrets.SIGNING_KEY }}
alias: ${{ secrets.SIGNING_KEY_ALIAS }}
keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }}
keyPassword: ${{ secrets.KEY_PASSWORD }}
env:
BUILD_TOOLS_VERSION: "34.0.0"
- name: Upload APK Release Asset
id: upload-release-asset-apk
uses: actions/upload-artifact@v3
with:
name: app-release.apk
path: ${{steps.sign_app_apk.outputs.signedReleaseFile}}