-
Notifications
You must be signed in to change notification settings - Fork 1
72 lines (60 loc) · 2.07 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
name: Release apks
on:
push:
tags:
- "v*"
jobs:
release:
runs-on: ubuntu-latest
if: ${{ github.repository_owner == 'turtton' }}
steps:
- uses: actions/checkout@v3
- name: set up JDK 11
uses: actions/setup-java@v4
with:
java-version: '11'
distribution: 'temurin'
cache: gradle
- name: Gradle Wrapper Validation
uses: gradle/wrapper-validation-action@v2
- name: Build apk
uses: gradle/gradle-build-action@v3
with:
arguments: clean assembleRelease
- name: Rename apks
run: |
cd app/build/outputs/apk/release
ls | sed -n 's/\(.*\)-unsigned.apk/mv \0 \1.apk/p' | sh
- name: Sign apk
uses: ilharp/sign-android-release@v1
id: sign_app
with:
releaseDir: app/build/outputs/apk/release
signingKey: ${{ secrets.APK_SIGNING_KEY }}
keyAlias: ${{ secrets.APK_SIGNING_ALIAS }}
keyStorePassword: ${{ secrets.APK_KEY_STORE_PASSWORD }}
keyPassword: ${{ secrets.APK_KEY_PASSWORD }}
buildToolsVersion: 33.0.0
- name: Upload to artifact
uses: actions/upload-artifact@v4
with:
name: Signed app bundle
path: ${{ steps.sign_app.outputs.signedFile }}
- name: Split signed files
uses: jungwinter/split@v2
id: signed_files
with:
msg: ${{ steps.sign_app.outputs.signedFiles }}
separator: ':'
- name: Create Release
uses: softprops/action-gh-release@v2
with:
token: "${{ secrets.GITHUB_TOKEN }}"
body: '[<img src="https://fdroid.gitlab.io/artwork/badge/get-it-on.png"alt="Get it on F-Droid"height="80">](https://f-droid.org/packages/net.turtton.ytalarm)'
draft: true
files: |
${{ steps.signed_files.outputs._0 }}
${{ steps.signed_files.outputs._1 }}
${{ steps.signed_files.outputs._2 }}
${{ steps.signed_files.outputs._3 }}
${{ steps.signed_files.outputs._4 }}