File tree Expand file tree Collapse file tree 1 file changed +46
-0
lines changed Expand file tree Collapse file tree 1 file changed +46
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : CI
2
+ on : [push, pull_request]
3
+ jobs :
4
+ build :
5
+ name : Build
6
+ runs-on : ubuntu-18.04
7
+ steps :
8
+ - uses : actions/checkout@v2
9
+
10
+ - name : Set up JDK 1.8
11
+ uses : actions/setup-java@v1
12
+ with :
13
+ java-version : 1.8
14
+
15
+ - name : Setup Android SDK
16
+ uses : android-actions/setup-android@v2
17
+
18
+ - name : Build release
19
+ run : ./gradlew assembleRelease
20
+
21
+ - uses : actions/upload-artifact@v2
22
+ with :
23
+ name : app
24
+ path : app/build/outputs/apk/release/app-release-unsigned.apk
25
+ if-no-files-found : error
26
+
27
+ deploy :
28
+ name : Deploy to GitHub Releases
29
+ needs : build
30
+ runs-on : ubuntu-18.04
31
+ if : github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
32
+ steps :
33
+ - name : Get the APK
34
+ id : get_apk
35
+ uses : actions/download-artifact@v2
36
+ with :
37
+ name : app
38
+
39
+ - name : Publish the APK to GitHub Releases
40
+ uses : svenstaro/upload-release-action@v2
41
+ with :
42
+ prerelease : true
43
+ asset_name : pinning-demo.apk
44
+ file : ${{ steps.get_apk.outputs.download-path }}/app-release-unsigned.apk
45
+ tag : ${{ github.ref }}
46
+ repo_token : ${{ secrets.GITHUB_TOKEN }}
You can’t perform that action at this time.
0 commit comments