-
Notifications
You must be signed in to change notification settings - Fork 4
69 lines (67 loc) · 2.2 KB
/
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
58
59
60
61
62
63
64
65
66
67
68
69
name: Release
on:
workflow_dispatch:
push:
tags:
- '*'
jobs:
build:
runs-on: ubuntu-22.04
steps:
- name: Project checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up JDK 17
uses: actions/setup-java@v1
with:
java-version: 17
- name: Cache Gradle Dependencies
uses: actions/cache@v2
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
!~/.gradle/caches/build-cache-*
key: gradle-deps-core-${{ hashFiles('**/build.gradle*') }}
restore-keys: |
gradle-deps
- name: Cache Gradle Build
uses: actions/cache@v2
with:
path: |
~/.gradle/caches/build-cache-*
key: gradle-builds-core-${{ github.sha }}
restore-keys: |
gradle-builds
- name: Signing key
run: |
echo 'androidStorePassword=${{ secrets.KEY_STORE_PASSWORD }}' >> local.properties
echo 'androidKeyAlias=${{ secrets.ALIAS }}' >> local.properties
echo 'androidKeyPassword=${{ secrets.KEY_PASSWORD }}' >> local.properties
echo 'androidStoreFile=sign_key.jks' >> local.properties
echo '${{ secrets.KEY_STORE }}' | base64 --decode > sign_key.jks
- name: Build
id: build
run: |
echo 'org.gradle.caching=true' >> gradle.properties
echo 'org.gradle.parallel=true' >> gradle.properties
echo 'org.gradle.vfs.watch=true' >> gradle.properties
echo 'org.gradle.jvmargs=-Xmx2048m' >> gradle.properties
./gradlew :app:assembleRelease
- name: Upload mappings
if: ${{ github.event_name == 'push' }}
uses: actions/upload-artifact@v4
with:
name: mappings
path: "app/build/outputs/mapping/release"
- name: Create release
uses: ncipollo/release-action@v1
with:
artifacts: "app/build/outputs/apk/release/app-release.apk"
draft: true
allowUpdates: true
omitDraftDuringUpdate: true
omitBodyDuringUpdate: true
omitNameDuringUpdate: true
token: ${{ secrets.GITHUB_TOKEN }}