File tree 1 file changed +67
-0
lines changed
1 file changed +67
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Build
2
+
3
+ on :
4
+ push :
5
+ branches : [ "master" ]
6
+ pull_request :
7
+ branches : [ "master" ]
8
+ workflow_dispatch :
9
+
10
+ jobs :
11
+ build :
12
+
13
+ runs-on : ubuntu-latest
14
+
15
+ steps :
16
+ - name : Check out
17
+ uses : actions/checkout@v4
18
+ with :
19
+ submodules : " recursive"
20
+ fetch-depth : 0
21
+
22
+ - name : Setup Gradle
23
+ uses : gradle/gradle-build-action@v3
24
+ with :
25
+ gradle-home-cache-cleanup : true
26
+
27
+ - name : Set up JDK 17
28
+ uses : actions/setup-java@v4
29
+ with :
30
+ distribution : ' temurin'
31
+ java-version : ' 17'
32
+
33
+ - name : Grant execute permission for gradlew
34
+ run : chmod +x gradlew
35
+
36
+ - name : Build with Gradle
37
+ run : |
38
+ yes | $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --licenses
39
+ ./gradlew zipRelease
40
+ ./gradlew zipDebug
41
+
42
+ - name : Prepare artifact
43
+ if : success()
44
+ id : prepareArtifact
45
+ run : |
46
+ releaseName=`ls module/release/Tricky-Store-v*-release.zip | awk -F '(/|.zip)' '{print $3}'` && echo "releaseName=$releaseName" >> $GITHUB_OUTPUT
47
+ debugName=`ls module/release/Tricky-Store-v*-debug.zip | awk -F '(/|.zip)' '{print $3}'` && echo "debugName=$debugName" >> $GITHUB_OUTPUT
48
+ unzip module/release/Tricky-Store-v*-release.zip -d module-release
49
+ unzip module/release/Tricky-Store-v*-debug.zip -d module-debug
50
+
51
+ - name : Upload release
52
+ uses : actions/upload-artifact@v4
53
+ with :
54
+ name : ${{ steps.prepareArtifact.outputs.releaseName }}
55
+ path : " ./module-release/*"
56
+
57
+ - name : Upload debug
58
+ uses : actions/upload-artifact@v4
59
+ with :
60
+ name : ${{ steps.prepareArtifact.outputs.debugName }}
61
+ path : " ./module-debug/*"
62
+
63
+ - name : Upload release mappings
64
+ uses : actions/upload-artifact@v4
65
+ with :
66
+ name : release-mappings
67
+ path : " ./service/build/outputs/mapping/release"
You can’t perform that action at this time.
0 commit comments