Merge pull request #40 from Super12138/master #5
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: Publish development release | |
on: | |
push: | |
branches: | |
- master | |
workflow_dispatch: | |
jobs: | |
release_development_build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout master branch | |
uses: actions/checkout@v4 | |
- name: Set up JDK 8 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: 8 | |
distribution: 'zulu' | |
- name: Set up Android SDK | |
uses: android-actions/setup-android@v3 | |
with: | |
cmdline-tools-version: 8512546 | |
log-accepted-android-sdk-licenses: false | |
- name: Make gradlew executable | |
run: chmod +x gradlew | |
- name: Build APK | |
run: ./gradlew assembleFdroidDebug | |
- name: Set environment variables | |
run: | | |
SHA_SHORT=$(git rev-parse --short HEAD) | |
echo "APK_PATH=app/build/outputs/apk/fdroid/debug" >> $GITHUB_ENV | |
echo "APK_NAME=LRC.Editor.Dev.Debug.$SHA_SHORT" >> $GITHUB_ENV | |
- name: Rename APK | |
run: mv $APK_PATH/app-fdroid-debug.apk $APK_PATH/$APK_NAME.apk | |
- name: Cleanup v-dev tag and release | |
run: gh release delete v-dev --cleanup-tag --yes || true | |
env: | |
GH_TOKEN: ${{ github.token }} | |
- name: Upload APK release | |
run: | | |
gh release create v-dev $APK_PATH/$APK_NAME.apk \ | |
--title "LRC Editor Developer Build" \ | |
--notes "Unreleased developer build (\`fdroid\` build variant) with the latest updates" \ | |
--target ${{ github.sha }} \ | |
--prerelease | |
env: | |
GH_TOKEN: ${{ github.token }} |