-
Notifications
You must be signed in to change notification settings - Fork 10
57 lines (46 loc) · 1.5 KB
/
publish-dev-release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
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 }}