Release APK #39
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: Release APK | |
on: | |
workflow_dispatch: | |
inputs: | |
versionName: | |
description: 'Name of version (ie 5.5.0)' | |
required: true | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
timeout-minutes: 30 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Restore keystore | |
run: | | |
echo '${{secrets.RELEASE_KEYSTORE}}' > release.keystore.asc | |
gpg -d --passphrase '${{secrets.RELEASE_KEYSTORE_PASSPHRASE}}' --batch release.keystore.asc > app/releaseKeyStore.jks | |
- name: Create branch | |
run: git checkout -b release/v${{ github.event.inputs.versionName }} | |
- name: Copy CI gradle.properties | |
run: mkdir -p ~/.gradle ; cp .github/ci-gradle.properties ~/.gradle/gradle.properties | |
- name: Set up JDK 11 | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'zulu' # See 'Supported distributions' for available options | |
java-version: '17' | |
- name: Build project | |
run: ./gradlew assembleRelease lintRelease --stacktrace | |
- name: Upload build outputs (APKs) | |
uses: actions/upload-artifact@v3 | |
with: | |
name: build-outputs | |
path: app/build/outputs | |
- name: Release | |
uses: ncipollo/release-action@v1 | |
with: | |
tag: ${{ github.event.inputs.versionName }} | |
artifacts: "app/build/outputs/apk/release/app-release.apk" | |
token: ${{ secrets.GITHUB_TOKEN }} |