-
Notifications
You must be signed in to change notification settings - Fork 0
76 lines (63 loc) · 2.53 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
70
71
72
73
74
75
76
name: Create Release
on:
push:
branches: [ master ]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[ci skip]')"
steps:
- uses: actions/checkout@v3
- name: Gradle Wrapper Validation
uses: gradle/wrapper-validation-action@v1
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: "temurin"
java-version: 17
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Setup gradle
uses: gradle/actions/setup-gradle@v4
- name: Build app
run: ./gradlew build
env:
SIGNING_KEY_FILE: "debug.keystore"
SIGNING_KEY_ALIAS: "androiddebugkey"
SIGNING_STORE_PASSWORD: "android"
SIGNING_KEY_PASSWORD: "android"
- name: Set release environment variables
if: ${{ github.ref == 'refs/heads/master' }}
run: |
echo "ARM64_APK_SHA256=$(sha256sum app/build/outputs/apk/release/*-arm64-v8a-release.apk | awk '{ print $1 }')" >> $GITHUB_ENV
echo "X86_64_APK_SHA256=$(sha256sum app/build/outputs/apk/release/*-x86_64-release.apk | awk '{ print $1 }')" >> $GITHUB_ENV
- name: Set debug environment variables
if: ${{ github.ref == 'refs/heads/dev' }}
run: |
echo "ARM64_APK_SHA256=$(sha256sum app/build/outputs/apk/debug/*-arm64-v8a-debug.apk | awk '{ print $1 }')" >> $GITHUB_ENV
echo "X86_64_APK_SHA256=$(sha256sum app/build/outputs/apk/debug/*-x86_64-debug.apk | awk '{ print $1 }')" >> $GITHUB_ENV
- name: Upload binaries to a release
if: ${{ github.ref == 'refs/heads/master' }}
uses: softprops/action-gh-release@v1
with:
body: |
> ${{ github.event.head_commit.message }}
### SHA-256 Checksums of APKs
* **arm64-v8a**: `${{ env.ARM64_APK_SHA256 }}`
* **x86_64**: `${{ env.X86_64_APK_SHA256 }}`
files: |
app/build/outputs/apk/release/*.apk
tag_name: "${{ github.run_number }}-${{ github.run_id }}"
- name: Upload binaries to a pre-release
if: ${{ github.ref == 'refs/heads/dev' }}
uses: softprops/action-gh-release@v1
with:
body: |
> ${{ github.event.head_commit.message }}
### SHA-256 Checksums of APKs
* **arm64-v8a**: `${{ env.ARM64_APK_SHA256 }}`
* **x86_64**: `${{ env.X86_64_APK_SHA256 }}`
files: |
app/build/outputs/apk/release/*.apk
tag_name: "${{ github.run_number }}-${{ github.run_id }}"