-
Notifications
You must be signed in to change notification settings - Fork 2
45 lines (38 loc) · 1.1 KB
/
main.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
name: Build and upload APK to pre-release
on:
push:
branches:
- master
permissions:
contents: write
jobs:
build-and-upload:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Write Keystore and Secret
env:
KEYSTORE_BASE64: ${{ secrets.KEYSTORE_BASE64 }}
SECRET_PROPERTIES: ${{ secrets.SECRET_PROPERTIES }}
run: |
echo "$KEYSTORE_BASE64" | base64 --decode > ks.jks
echo "$SECRET_PROPERTIES" >> local.properties
- name: Setup Java
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: microsoft
cache: 'gradle'
- name: Build APK
run: ./gradlew build --no-daemon
- name: Create pre-release
id: create_release
uses: softprops/action-gh-release@v1
with:
files: |
app/build/outputs/apk/debug/app-debug.apk
app/build/outputs/apk/release/app-release.apk
tag_name: nightly
release_name: Nightly Build
prerelease: true