Release #15
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 | |
on: | |
workflow_dispatch: | |
inputs: | |
versionNumber: | |
description: 'Version number' | |
required: true | |
versionName: | |
description: 'Version name' | |
required: true | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v2 | |
with: | |
java-version: '17' | |
distribution: 'zulu' | |
cache: gradle | |
- name: Create production google-services.json | |
uses: 1arp/create-a-file-action@0.2 | |
with: | |
path: app | |
file: google-services.json | |
content: ${{secrets.GOOGLE_SERVICES}} | |
- name: Set app version | |
uses: chkfung/android-version-actions@v1.2.1 | |
with: | |
gradlePath: app/build.gradle.kts | |
versionCode: ${{ github.event.inputs.versionNumber }} | |
versionName: ${{ github.event.inputs.versionName }} | |
- name: Grant execute permission for gradlew | |
run: chmod +x gradlew | |
- name: Build Project | |
run: ./gradlew buildFreeRelease | |
- name: Bundle Release AAB | |
run: ./gradlew bundleFreeRelease | |
- name: Sign AAB | |
uses: r0adkll/sign-android-release@v1 | |
id: sign_app | |
with: | |
releaseDirectory: app/build/outputs/bundle/freeRelease | |
signingKeyBase64: ${{ secrets.SIGN_KEY }} | |
alias: ${{ secrets.SIGN_KEY_ALIAS }} | |
keyStorePassword: ${{ secrets.SIGN_KEY_STORE_PASSWORD }} | |
keyPassword: ${{ secrets.SIGN_KEY_PASSWORD }} | |
- name: Deploy to Play Store | |
uses: r0adkll/upload-google-play@v1.0.16 | |
with: | |
serviceAccountJsonPlainText: ${{secrets.GOOGLE_SERVICE_ACCOUNT}} | |
packageName: sk.styk.martin.apkanalyzer | |
releaseFiles: ${{ steps.sign_app.outputs.signedReleaseFile }} | |
mappingFile: app/build/outputs/mapping/freeRelease/mapping.txt | |
track: beta | |
status: completed | |
releaseName: ${{ github.event.inputs.versionNumber }} (${{ github.event.inputs.versionName }}) | |
- name: Push current release tag | |
uses: thejeff77/action-push-tag@v1.0.0 | |
with: | |
tag: ${{ github.event.inputs.versionNumber }} | |
- name: Create Github release | |
uses: softprops/action-gh-release@v1 | |
with: | |
name: ${{ github.event.inputs.versionName }} | |
tag_name: ${{ github.event.inputs.versionNumber }} | |