-
-
Notifications
You must be signed in to change notification settings - Fork 23
79 lines (63 loc) · 1.79 KB
/
build.yaml
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
name: build
on:
push:
branches:
- main
tags:
- v*
pull_request:
branches:
- main
workflow_dispatch:
schedule:
- cron: '0 0 * * 1'
jobs:
build:
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install SDK
uses: malinskiy/action-android/install-sdk@release/0.1.4
- name: Install NDK
run: |
sdkmanager --install "ndk;$(grep ndkVersion app/gradle.properties | cut -d= -f2)"
- name: Build
run: |
./gradlew build
release:
if: startsWith(github.ref, 'refs/tags/v')
needs: [build]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install SDK
uses: malinskiy/action-android/install-sdk@release/0.1.4
- name: Install NDK
run: |
sdkmanager --install "ndk;$(grep ndkVersion app/gradle.properties | cut -d= -f2)"
- name: Check version
run: |
./gradlew checkVersion
- name: Build APK
env:
SIGNING_STORE_FILE: roc-droid.jks
SIGNING_STORE_PASSWORD: ${{ secrets.SIGNING_STORE_PASSWORD }}
SIGNING_KEY_ALIAS: ${{ secrets.SIGNING_KEY_ALIAS }}
SIGNING_KEY_PASSWORD: ${{ secrets.SIGNING_KEY_PASSWORD }}
run: |
echo "${{ secrets.SIGNING_STORE_BASE64 }}" | base64 -di > app/${{ env.SIGNING_STORE_FILE }}
./gradlew assembleRelease
- name: Release
uses: softprops/action-gh-release@v1
with:
draft: true
files: app/build/outputs/apk/release/roc-droid-*.apk
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}