forked from DD3Boh/OuterTune
-
Notifications
You must be signed in to change notification settings - Fork 0
69 lines (57 loc) · 1.85 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
name: Build APK
on:
workflow_dispatch:
push:
branches:
- '**'
paths-ignore:
- 'README.md'
- 'fastlane/**'
- 'assets/**'
- '.github/**/*.md'
- '.github/FUNDING.yml'
- '.github/ISSUE_TEMPLATE/**'
permissions:
contents: write
discussions: write
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
abi: [ "universal", "arm64", "x86_64", "uncommon_abi" ] # Defined ABIs
steps:
- uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v3
with:
java-version: '21'
distribution: 'temurin'
- name: Set Up Gradle
uses: gradle/actions/setup-gradle@v4
with:
cache-cleanup: on-success
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build APK for ABI
run: ./gradlew assemble${{ matrix.abi }}Release
env:
PULL_REQUEST: 'false'
- name: Sign APKs
uses: ilharp/[email protected]
with:
releaseDir: app/build/outputs/apk/${{ matrix.abi }}/release
signingKey: ${{ secrets.RELEASE_KEYSTORE }}
keyAlias: ${{ secrets.ALIAS }}
keyStorePassword: ${{ secrets.RELEASE_KEYSTORE_PASSWORD }}
keyPassword: ${{ secrets.RELEASE_KEYSTORE_PASSWORD }}
buildToolsVersion: 35.0.0
- name: Move signed APK
run: |
mkdir -p app/build/outputs/apk/${{ matrix.abi }}/release/out
mv app/build/outputs/apk/${{ matrix.abi }}/release/*-unsigned-signed.apk app/build/outputs/apk/${{ matrix.abi }}/release/out/app-${{ matrix.abi }}-release.apk
- name: Upload release APK
uses: actions/upload-artifact@v4
with:
name: app-${{ matrix.abi }}-release
path: "app/build/outputs/apk/${{ matrix.abi }}/release/out/*"