1- name : CI
2-
3- on :
4- workflow_dispatch :
5- pull_request :
6- branches :
7- - main
8- paths-ignore :
9- - ' README.md'
10- - ' fastlane/**'
11- - ' assets/**'
12- - ' .github/**'
13- push :
14- branches :
15- - main
16- paths-ignore :
17- - ' README.md'
18- - ' fastlane/**'
19- - ' assets/**'
20- - ' .github/**'
21-
22- jobs :
23- build-client :
24- runs-on : ubuntu-latest
25- outputs :
26- files : ${{ steps.step-output.outputs.files }}
27- steps :
28- - uses : actions/checkout@v3
29- with :
30- submodules : recursive
31-
32- - uses : gradle/wrapper-validation-action@v1
33-
34- - name : Create and checkout branch
35- # push events already checked out the branch
36- if : github.event_name == 'pull_request'
37- env :
38- BRANCH : ${{ github.head_ref }}
39- run : git checkout -B "$BRANCH"
40-
1+ name : CI
2+
3+ on :
4+ workflow_dispatch :
5+ pull_request :
6+ branches :
7+ - main
8+ paths-ignore :
9+ - ' README.md'
10+ - ' fastlane/**'
11+ - ' assets/**'
12+ - ' .github/**'
13+ push :
14+ branches :
15+ - main
16+ paths-ignore :
17+ - ' README.md'
18+ - ' fastlane/**'
19+ - ' assets/**'
20+ - ' .github/**'
21+
22+ jobs :
23+ build-client :
24+ runs-on : ubuntu-latest
25+ outputs :
26+ files : ${{ steps.step-output.outputs.files }}
27+ steps :
28+ - uses : actions/checkout@v3
29+ with :
30+ submodules : recursive
31+
32+ - uses : gradle/wrapper-validation-action@v1
33+
34+ - name : Create and checkout branch
35+ # push events already checked out the branch
36+ if : github.event_name == 'pull_request'
37+ env :
38+ BRANCH : ${{ github.head_ref }}
39+ run : git checkout -B "$BRANCH"
40+
4141 - name : Set up JDK 24
4242 uses : actions/setup-java@v4
4343 with :
4444 java-version : 24
4545 distribution : " temurin"
4646 cache : ' gradle'
47-
48- - name : Build debug APK
47+
48+ - name : Build Nightly APK
49+ env :
50+ NIGHTLY_KEYSTORE_FILE : ../../nightly.jks
51+ NIGHTLY_KEYSTORE_PASSWORD : ${{ secrets.NIGHTLY_KEYSTORE_PASSWORD }}
52+ NIGHTLY_KEY_ALIAS : ${{ secrets.NIGHTLY_KEY_ALIAS }}
53+ NIGHTLY_KEY_PASSWORD : ${{ secrets.NIGHTLY_KEY_PASSWORD }}
4954 run : |
55+ if [ -n "${{ secrets.NIGHTLY_KEYSTORE_BASE64 }}" ]; then
56+ echo "${{ secrets.NIGHTLY_KEYSTORE_BASE64 }}" | base64 -d > nightly.jks
57+ fi
5058 cd client/android
51- ./gradlew assembleDebug lintDebug --stacktrace -DskipFormatKtlint
59+ ./gradlew assembleNightly lintNightly --stacktrace -DskipFormatKtlint
5260
5361 - name : Upload APKs
5462 uses : actions/upload-artifact@v4
5563 with :
5664 name : all-apks-in-one(intermediates)
5765 retention-days : 1
58- path : client/android/build/outputs/apk/debug /*.apk
66+ path : client/android/build/outputs/apk/nightly /*.apk
5967
6068 - name : Output filenames
6169 id : step-output
6270 run : |
63- files=$(ls client/android/build/outputs/apk/debug )
71+ files=$(ls client/android/build/outputs/apk/nightly )
6472
6573 json_array="["
6674 first_file=true
@@ -76,23 +84,23 @@ jobs:
7684
7785 echo "files=$json_array"
7886 echo "files=$json_array" >> "$GITHUB_OUTPUT"
79-
80- upload-apk :
81- runs-on : ubuntu-latest
82- needs : build-client
83- strategy :
84- matrix :
85- file : ${{ fromJson(needs.build-client.outputs.files) }}
86- steps :
87- - name : Download APKs
88- uses : actions/download-artifact@v4
89- with :
90- name : all-apks-in-one(intermediates)
91- path : apks
92- merge-multiple : true
93-
94- - name : Upload artifacts
95- uses : actions/upload-artifact@v4
96- with :
97- name : ${{ matrix.file }}
98- path : apks/${{ matrix.file }}
87+
88+ upload-apk :
89+ runs-on : ubuntu-latest
90+ needs : build-client
91+ strategy :
92+ matrix :
93+ file : ${{ fromJson(needs.build-client.outputs.files) }}
94+ steps :
95+ - name : Download APKs
96+ uses : actions/download-artifact@v4
97+ with :
98+ name : all-apks-in-one(intermediates)
99+ path : apks
100+ merge-multiple : true
101+
102+ - name : Upload artifacts
103+ uses : actions/upload-artifact@v4
104+ with :
105+ name : ${{ matrix.file }}
106+ path : apks/${{ matrix.file }}
0 commit comments