Update build.gradle.kts #13
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 & Publish APK | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
Gradle: | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout code | |
uses: actions/checkout@v2 | |
- name: setup jdk | |
uses: actions/setup-java@v1 | |
with: | |
java-version: 17 | |
- name: Make Gradle executable | |
run: chmod +x ./gradlew | |
- name: Build Release APK | |
run: ./gradlew assembleRelease | |
- name: Build Debug APK | |
run: ./gradlew assembleDebug | |
- name: version | |
run: echo "CUR_VERSION=$(grep -o -E 'versionName = \"[[:digit:]\.]+\"' app/build.gradle.kts | grep -o -E '[[:digit:]\.]+')" >> $GITHUB_OUTPUT | |
id: version | |
- name: Release | |
uses: softprops/action-gh-release@v2 | |
with: | |
generate_release_notes: true | |
make_latest: true | |
tag_name: ${{ steps.version.outputs.CUR_VERSION }} | |
files: | | |
app/build/outputs/apk/release/app-release-unsigned.apk | |
app/build/outputs/apk/debug/app-debug-unsigned.apk | |
permissions: | |
contents: write |