-
Notifications
You must be signed in to change notification settings - Fork 36
104 lines (84 loc) · 3.19 KB
/
Build.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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
name: Pre-release CI
on:
push:
branches:
- master
permissions:
contents: write
concurrency:
group: "pre-release"
cancel-in-progress: true
jobs:
build:
name: Build app
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@v1
- name: Setup Android SDK
run: |
${ANDROID_SDK_ROOT}/cmdline-tools/latest/bin/sdkmanager "build-tools;29.0.3"
- name: Set up JDK
uses: actions/setup-java@v4
with:
java-version: 17
distribution: adopt
- name: Build release artifacts
uses: gradle/gradle-command-action@v2
with:
arguments: :app:assembleRelease :app:assemblePrerelease makeJar fatJar
- name: Sign release APK
uses: r0adkll/sign-android-release@v1
with:
releaseDirectory: app/build/outputs/apk/release
signingKeyBase64: ${{ secrets.SIGNING_KEY }}
alias: ${{ secrets.ALIAS }}
keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }}
keyPassword: ${{ secrets.KEY_PASSWORD }}
- name: Sign pre-release APK
uses: r0adkll/sign-android-release@v1
with:
releaseDirectory: app/build/outputs/apk/prerelease
signingKeyBase64: ${{ secrets.SIGNING_KEY }}
alias: ${{ secrets.ALIAS }}
keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }}
keyPassword: ${{ secrets.KEY_PASSWORD }}
- name: Clean up build artifacts
run: |
set -e
mv app/build/outputs/apk/release/app-release-unsigned-signed.apk flixclusive-release.apk
sha=`sha256sum flixclusive-release.apk | awk '{ print $1 }'`
echo "RELEASE_SHA=$sha" >> $GITHUB_ENV
mv app/build/outputs/apk/prerelease/app-prerelease-unsigned-signed.apk flixclusive-prerelease.apk
sha=`sha256sum flixclusive-prerelease.apk | awk '{ print $1 }'`
echo "PRERELEASE_SHA=$sha" >> $GITHUB_ENV
- name: Create Pre-release
uses: softprops/action-gh-release@v1
with:
tag_name: "pre-release"
name: "Pre-release build"
body: |
---
_NOTE: Android TV is incomplete. Though, you could test it now._
### Changes
### Known issues
- TV focus crashes. Compose TV is bugged af; we wait til the new update.
---
##### The `prerelease` apk is similar to release but for _debugging_ purposes only. Use this if you want to test the latest features without messing up your authentic release data.
---
### Checksums
| Variant | SHA-256 |
| ------- | ------- |
| release | ${{ env.RELEASE_SHA }} |
| pre-release | ${{ env.PRERELEASE_SHA }} |
files: |
flixclusive-release.apk
flixclusive-prerelease.apk
app/build/libs/fat-sources.jar
app/build/classes.jar
draft: false
prerelease: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}