forked from maxrave-dev/SimpMusic
-
-
Notifications
You must be signed in to change notification settings - Fork 0
68 lines (57 loc) · 2.08 KB
/
beta-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
name: Build the latest beta APK
env:
# The name of the main module repository
main_project_module: app
app_name: SimpMusic
apk_file_name: SimpMusic
on:
workflow_dispatch:
push:
branches: ["main"]
paths-ignore:
- "README.md"
- ".github/**/*.md"
- ".github/ISSUE_TEMPLATE/**"
pull_request:
branches: ["main"]
paths-ignore:
- "README.md"
- ".github/**/*.md"
- ".github/ISSUE_TEMPLATE/**"
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set Up JDK
uses: actions/setup-java@v4
with:
distribution: "temurin"
java-version: "21"
- name: Change wrapper permissions
run: chmod +x ./gradlew
# Create APK Release
- name: Build apk release project (APK) - ${{ env.main_project_module }} module
run: ./gradlew assemble
- uses: filippoLeporati93/android-release-signer@v1
name: Sign app APK
# ID used to access action output
id: sign_app
with:
releaseDirectory: ${{ env.main_project_module }}/build/outputs/apk/release
signingKeyBase64: ${{ secrets.SIGNING_KEY }}
alias: ${{ secrets.ALIAS }}
keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }}
keyPassword: ${{ secrets.KEY_PASSWORD }}
env:
# override default build-tools version (33.0.0) -- optional
BUILD_TOOLS_VERSION: "35.0.0"
- name: Rename APK file
run: sudo mv ${{steps.sign_app.outputs.signedReleaseFile}} /${{env.apk_file_name}}.apk
- name: Upload APK Release
uses: actions/upload-artifact@v4
with:
name: release-build
path: /${{env.apk_file_name}}.apk
overwrite: true
if-no-files-found: error