Release update #25
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: Build APK | |
on: | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
jobs: | |
release_build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2.6.0 | |
- name: Setup JAVA 11 | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'corretto' | |
java-version: 17 | |
- name: Cache Gradle and wrapper | |
uses: actions/cache@v2 | |
with: | |
path: | | |
~/.gradle/caches | |
~/.gradle/wrapper | |
- name: Build Release apk | |
run: ./gradlew assembleRelease | |
- name: Build Release bundle | |
run: ./gradlew bundleRelease | |
- name: Get Version Name | |
id: get_version_name | |
run: echo "::set-output name=version_name::$(grep 'versionName' app/build.gradle | sed -E 's/.*"(.+)"$/\1/')" | |
- name: Upload Release Build to Artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: release-artifacts | |
path: | | |
app/build/outputs/apk/release/ | |
app/build/outputs/bundle/release/ | |
- name: Create Github Release | |
if: startsWith(github.ref, 'refs/tags/') | |
uses: softprops/action-gh-release@v1 | |
with: | |
tag_name: ${{ steps.tag.outputs.tag }} | |
generate_release_notes: true | |
prerelease: true | |
files: | | |
app/build/outputs/apk/release/app-release.apk | |
app/build/outputs/bundle/release/app-release.aab |