-
Notifications
You must be signed in to change notification settings - Fork 13
54 lines (45 loc) · 1.82 KB
/
build_debug.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
name: Build Nightly APK
on:
push:
branches: [ "beta" ]
workflow_dispatch:
jobs:
build:
name: Build Nightly APK
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: set up JDK 18
uses: actions/setup-java@v4
with:
java-version: '18'
distribution: 'temurin'
cache: gradle
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Get application version name
run: echo "VERSION_NAME=beta-$(($(cat app/build.gradle.kts | grep versionCode | tr -s ' ' | cut -d " " -f 4 | tr -d '\r')))" >> $GITHUB_ENV
- name: Bump application version code
uses: chkfung/[email protected]
with:
gradlePath: app/build.gradle.kts
versionCode: ${{github.run_number}}
versionName: "${{ env.VERSION_NAME }} Dev (#${{github.run_number}})"
- name: Write sign info
if: github.repository == 'DHD2280/Oxygen-Customizer'
run: |
if [ ! -z "${{ secrets.KEYSTORE }}" ]; then
echo storePassword='${{ secrets.KEYSTORE_PASSWORD }}' >> keystore.properties
echo keyAlias='${{ secrets.KEY_ALIAS }}' >> keystore.properties
echo keyPassword='${{ secrets.KEY_PASSWORD }}' >> keystore.properties
echo storeFile='${{ github.workspace }}/key.jks' >> keystore.properties
echo ${{ secrets.KEYSTORE }} | base64 --decode > ${{ github.workspace }}/key.jks
fi
- name: Build with Gradle
run: ./gradlew assembleRelease
- name: Upload a Build Artifact
uses: actions/upload-artifact@v4
with:
name: "Oxygen Customizer ${{ env.VERSION_NAME }} Dev (#${{github.run_number}})"
path: app/build/outputs/apk/release/*.apk
if-no-files-found: error