forked from orgzly-revived/orgzly-android-revived
-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (41 loc) · 1.45 KB
/
prerelease.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
name: Build beta APK and prepare Github pre-release draft
on:
# Trigger by pushing a version tag (which are protected)
push:
tags:
- v*.*.*-*
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
permissions:
contents: write
jobs:
prerelease:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup JDK
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '11'
- name: Generate "premium" debug APK
run: ./gradlew assemblePremiumDebug --stacktrace
- name: Sign APK using key store from repo secrets
uses: r0adkll/sign-android-release@v1
id: sign_apk
with:
releaseDirectory: app/build/outputs/apk/premium/debug
signingKeyBase64: ${{ secrets.APK_SIGNING_KEYSTORE_FILE }}
alias: orgzly-revived-20231013
keyStorePassword: ${{ secrets.APK_SIGNING_KEYSTORE_PASSWORD }}
- name: Get version name from git tag
run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_ENV
- name: Rename APK file
run: mv ${{steps.sign_apk.outputs.signedReleaseFile}} orgzly-revived-${{ env.VERSION }}-debug.apk
- name: Upload APK and create Github pre-release draft
uses: softprops/action-gh-release@v1
with:
files: 'orgzly-revived-*.apk'
prerelease: true
draft: true