File tree Expand file tree Collapse file tree 1 file changed +39
-17
lines changed Expand file tree Collapse file tree 1 file changed +39
-17
lines changed Original file line number Diff line number Diff line change 1
- name : CI
1
+ name : Build
2
2
3
3
on :
4
4
push :
5
- branches : " *"
5
+ paths-ignore :
6
+ - " CONTRIB"
7
+ - " LICENSE"
8
+ - " PRIVACY"
9
+ - " README.md"
6
10
pull_request :
7
11
branches : [ "master" ]
12
+ workflow_dispatch :
8
13
9
14
jobs :
10
15
build :
11
-
16
+ name : Build
12
17
runs-on : ubuntu-latest
13
-
14
18
steps :
15
- - uses : actions/checkout@v4
16
- - name : Set up JDK 17
17
- uses : actions/setup-java@v3
19
+
20
+ - name : Checkout
21
+ uses : actions/checkout@v4
22
+
23
+ - name : Setup Java
24
+ uses : actions/setup-java@v4
18
25
with :
19
26
java-version : ' 17'
20
27
distribution : ' temurin'
21
- - name : Install Bazel
22
- run : |
23
- sudo apt install apt-transport-https curl gnupg -y
24
- curl -fsSL https://bazel.build/bazel-release.pub.gpg | gpg --dearmor >bazel-archive-keyring.gpg
25
- sudo mv bazel-archive-keyring.gpg /usr/share/keyrings
26
- echo "deb [arch=amd64 signed-by=/usr/share/keyrings/bazel-archive-keyring.gpg] https://storage.googleapis.com/bazel-apt stable jdk1.8" | sudo tee /etc/apt/sources.list.d/bazel.list
27
- sudo apt update
28
- sudo apt install bazel -y
28
+
29
+ - name : Setup Bazel
30
+ uses : bazel-contrib/[email protected]
31
+ with :
32
+ bazelisk-cache : true
33
+ disk-cache : ${{ github.workflow }}
34
+ repository-cache : true
35
+
29
36
- name : Build
30
37
run : |
31
- chmod +X build.sh
38
+ chmod +x build.sh
32
39
./build.sh
40
+
33
41
- name : Test
34
- run : bazel test :all
42
+ run : bazel test :all
43
+
44
+ - name : Set environments
45
+ run : |
46
+ {
47
+ echo "commit=$(echo ${{ github.sha }} | cut -c-7)"
48
+ echo "repo=$(echo ${GITHUB_REPOSITORY#$GITHUB_REPOSITORY_OWNER/})"
49
+ echo "version=v$(grep -o 'android:versionName="[^"]*"' src/main/AndroidManifest.xml | awk -F'"' '{print $2}')"
50
+ } >> $GITHUB_ENV
51
+
52
+ - name : Upload APK
53
+ uses : actions/upload-artifact@v4
54
+ with :
55
+ name : ${{ env.repo }}-${{ env.version }}@${{ env.commit }}
56
+ path : bazel-bin/*.apk
You can’t perform that action at this time.
0 commit comments