-
-
Notifications
You must be signed in to change notification settings - Fork 153
33 lines (31 loc) · 1.15 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
on: [push, pull_request]
name: Build
jobs:
check:
name: Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v1
with:
java-version: 17
- if: ${{ !startsWith(github.ref, 'refs/tags/v') }}
run: ./gradlew build --stacktrace
- if: ${{ startsWith(github.ref, 'refs/tags/v') }}
run: |
export RELEASE_STORE_FILE=$(pwd)/gotfy-release-key.jks
echo $RELEASE_KEY | base64 -d > $RELEASE_STORE_FILE
./gradlew -Psign build --stacktrace
cp app/build/outputs/apk/release/app-release.apk app/build/outputs/apk/release/Gotify.apk
env:
RELEASE_KEY: ${{ secrets.RELEASE_KEY }}
RELEASE_STORE_PASSWORD: ${{ secrets.STOREPASS }}
RELEASE_KEY_ALIAS: gotify-release-key
RELEASE_KEY_PASSWORD: ${{ secrets.KEYPASS }}
- if: ${{ startsWith(github.ref, 'refs/tags/v') }}
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: app/build/outputs/apk/release/Gotify.apk
tag: ${{ github.ref }}
overwrite: true