-
Notifications
You must be signed in to change notification settings - Fork 0
74 lines (63 loc) · 2.51 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
name: Build & Release
on:
workflow_dispatch:
push:
tags:
- 'v*.*'
jobs:
build:
runs-on: ubuntu-latest
env:
JAVA_VERSION: '21'
ANDROID_API_LEVEL: 34
ANDROID_BUILD_TOOLS_VERSION: 34.0.0
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up JDK
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: ${{ env.JAVA_VERSION }}
- name: Set up Android SDK
uses: android-actions/setup-android@v3
- name: Build app
run: ./gradlew assembleRelease
- name: Sign APK
id: sign_app
uses: ilharp/sign-android-release@nightly
with:
releaseDir: app/build/outputs/apk/release
signingKey: ${{ secrets.SIGNING_KEY }}
keyAlias: ${{ secrets.ALIAS }}
keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }}
keyPassword: ${{ secrets.KEY_PASSWORD }}
buildToolsVersion: ${{ env.ANDROID_BUILD_TOOLS_VERSION }}
- name: Rename apks
run: |
mv app/build/outputs/apk/release/app-arm64-v8a-release-unsigned-signed.apk hviewer-${{ github.ref_name }}-arm64-v8a-release.apk
mv app/build/outputs/apk/release/app-armeabi-v7a-release-unsigned-signed.apk hviewer-${{ github.ref_name }}-armeabi-v7a-release.apk
mv app/build/outputs/apk/release/app-universal-release-unsigned-signed.apk hviewer-${{ github.ref_name }}-universal-release.apk
mv app/build/outputs/apk/release/app-x86-release-unsigned-signed.apk hviewer-${{ github.ref_name }}-x86-release.apk
mv app/build/outputs/apk/release/app-x86_64-release-unsigned-signed.apk hviewer-${{ github.ref_name }}-x86_64-release.apk
# - name: Create changelog
# id: changelog
# uses: requarks/changelog-action@v1
# with:
# token: ${{ github.token }}
# tag: ${{ github.ref_name }}
# includeInvalidCommits: true
# excludeTypes: build,chore
# writeToFile: false
- name: Create release
uses: softprops/action-gh-release@v2
with:
body: ChangeLog
files: |
hviewer-${{ github.ref_name }}-arm64-v8a-release.apk
hviewer-${{ github.ref_name }}-armeabi-v7a-release.apk
hviewer-${{ github.ref_name }}-universal-release.apk
hviewer-${{ github.ref_name }}-x86-release.apk
hviewer-${{ github.ref_name }}-x86_64-release.apk
fail_on_unmatched_files: true
make_latest: true