11name : Android Build # # name of the workflow
22
33on :
4+ workflow_dispatch :
45 push :
56 pull_request :
67
@@ -12,36 +13,47 @@ jobs:
1213
1314 steps :
1415 - name : Check out Git repository # clone the repo to local ci workspace
15- uses : actions/checkout@v2
16+ uses : actions/checkout@v3
1617
1718 - name : Set up our JDK environment # setup JDK environment: mandatory as we need to build android project
18- uses : actions/setup-java@v1.4.3
19+ uses : actions/setup-java@v2
1920 with :
20- java-version : 1.8
21+ distribution : ' zulu'
22+ java-version : 8
23+
24+ - name : Set up our Node version
25+ uses : actions/setup-node@v3
26+ with :
27+ node-version : 16.14
2128
2229 - name : Install dependencies
2330 run : npm ci
2431
2532 # configure cash for gradle : will help to reduce build time
2633 - name : Cache Gradle Wrapper
27- uses : actions/cache@v2
34+ uses : actions/cache@v3
2835 with :
2936 path : ~/.gradle/wrapper
3037 key : ${{ runner.os }}-gradle-wrapper-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }}
3138
3239 - name : Cache Gradle Dependencies
33- uses : actions/cache@v2
40+ uses : actions/cache@v3
3441 with :
3542 path : ~/.gradle/caches
3643 key : ${{ runner.os }}-gradle-caches-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }}
3744 restore-keys : |
3845 ${{ runner.os }}-gradle-caches-
46+
3947 - name : Make Gradlew Executable
4048 run : cd android && chmod +x ./gradlew
4149
4250 - name : Generate App APK
4351 run : |
4452 npm run build:release
53+ env :
54+ APP_CENTER_SECRET : ${{ secrets.APP_CENTER_SECRET }}
55+ CODE_PUSH_DEPLOYMENT_KEY : ${{ secrets.CODE_PUSH_DEPLOYMENT_KEY }}
56+ NODE_ENV : ${{ secrets.NODE_ENV }}
4557
4658 # # sign generated apk
4759 - name : Sign APK
5567 keyPassword : ${{ secrets.MYAPP_UPLOAD_KEY_PASSWORD }}
5668 fileRegex : .*apk
5769
70+ - name : Upload artifact to App Center
71+ uses : wzieba/AppCenter-Github-Action@v1
72+ with :
73+ appName : xianshenglu/cloudflare-ip-tester-app
74+ token : ${{secrets.APP_CENTER_TOKEN}}
75+ group : Collaborators
76+ file : android/app/build/outputs/apk/release/app-universal-release.apk
77+ notifyTesters : true
78+ debug : false
79+
5880 - name : test
5981 id : test
6082 run : |
0 commit comments