-
Notifications
You must be signed in to change notification settings - Fork 25
66 lines (58 loc) · 1.92 KB
/
android_daily_update.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
name: Android CI Daily Update
on:
push:
branches: [ "dev" ]
pull_request:
branches: [ "dev" ]
jobs:
build:
name: Build Apk And Release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4.2.2
with:
repository: cy745/lmusic
ref: dev
ssh-strict: true
persist-credentials: true
clean: true
fetch-depth: 1
lfs: false
submodules: recursive
- name: Create the Keystore from Secrets to Sign the App
env:
KEYSTORE_JKS_BASE64: ${{ secrets.KEYSTORE_JKS_BASE64 }}
KEYSTORE_PROPERTIES_BASE64: ${{ secrets.KEYSTORE_PROPERTIES_BASE64 }}
run: |
# Import keystore from secrets
ls -all
echo $KEYSTORE_JKS_BASE64 | base64 -di > ${{ github.workspace }}/keystore.jks
echo $KEYSTORE_PROPERTIES_BASE64 | base64 -di > ${{ github.workspace }}/keystore.properties
- name: Set up JDK 17
uses: actions/setup-java@v4.5.0
with:
java-version: '17'
distribution: 'temurin'
cache: gradle
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
run: ./gradlew build
- name: Upload Apk to Artifact
uses: actions/upload-artifact@v4.4.3
with:
name: LMusic-Apks
path: ${{ github.workspace }}/app/build/outputs/apk/release/*.apk
- name: Beta Release
uses: softprops/action-gh-release@v1
if: contains(github.event.head_commit.message, '#beta')
with:
body: ${{ github.event.head_commit.message }}
draft: false
prerelease: true
tag_name: "Beta"
fail_on_unmatched_files: true
files: |
${{ github.workspace }}/app/build/outputs/apk/beta/*.apk
${{ github.workspace }}/app/build/outputs/apk/debug/*.apk