55 branches : [ "master" ]
66 pull_request :
77 branches : [ "master" ]
8-
9- workflow_dispatch :
10- inputs :
11- app_id :
12- description : ' The application Id of the current build'
13- required : true
14- branch :
15- description : ' The branch from which we have to build'
16- required : true
17- default : ' master'
8+ # Add support for manual trigger(if needed)
9+ # workflow_dispatch:
10+ # inputs:
11+ # app_id:
12+ # description: 'The application Id of the current build'
13+ # required: true
14+ # branch:
15+ # description: 'The branch from which we have to build'
16+ # required: true
17+ # default: 'master'
1818
1919jobs :
2020 build :
2121 name : Setup Environment and build
2222 runs-on : self-hosted
2323 steps :
24+ # Checkout code
2425 - name : Checkout the code to specific branch
2526 uses : actions/checkout@v2
2627 with :
2728 ref : ${{ github.event.inputs.branch }}
28-
29+ # Setup JDK
2930 - name : Set up JDK
3031 uses : actions/setup-java@v2
3132 with :
3233 distribution : ' zulu'
3334 java-version : ' 11'
34-
35+ # Setup Android SDK
3536 - name : Setup Android SDK
3637 uses : android-actions/setup-android@v2
37-
38+ # Gradle Caching(optional)
3839 - uses : actions/cache@v2
3940 with :
4041 path : |
@@ -43,48 +44,52 @@ jobs:
4344 key : ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
4445 restore-keys : |
4546 ${{ runner.os }}-gradle-
46-
47+ # Make Gradle Executable
4748 - name : Make gradlew executable
4849 run : chmod +x ./gradlew
49-
50+ # For Bundle:
5051 - name : Generate app bundle
5152 run : ./gradlew app:bundleRelease --stacktrace
53+ # For APK:
54+ - name : Generate app APK.
55+ run : ./gradlew assembleRelease --stacktrace
5256
53- - name : Sign app bundle
54- run : |
55- jarsigner -keystore app/*.jks \
56- -storepass ${{ secrets.KEY_STORE_PASSWORD }} -keypass ${{ secrets.KEY_PASSWORD }} \
57- app/build/outputs/bundle/release/app-release.aab ${{ secrets.ALIAS }}
58-
59- # STEP 2 : Upload the Artifact
60- upload :
61- needs : [ build ]
62- name : Upload the signed artifact
63- runs-on : self-hosted
64- steps :
65- - name : Upload Bundle
66- uses : actions/upload-artifact@v2
67- with :
68- name : signed_app_bundle
69- path : app/build/outputs/bundle/release/app-release.aab
70-
71-
72- # Step 3 : Release to playstore
73- deploy :
74- needs : [ build ]
75- name : Create release on Playstore
76- runs-on : self-hosted
77- steps :
78- - name : Create service_account.json
79- run : echo '${{ secrets.SERVICE_ACCOUNT_JSON }}' > service_account.json
80-
81- - name : Deploy to Play Store
82- uses : r0adkll/upload-google-play@v1.0.15
83- with :
84- serviceAccountJson : service_account.json
85- packageName : ${{ github.event.inputs.app_id }}
86- releaseFiles : app/build/outputs/bundle/release/*.aab
87- track : internal
88- whatsNewDirectory : whatsnew/
89- mappingFile : app/build/outputs/mapping/release/mapping.txt
90- inAppUpdatePriority : 5
57+ # # Sign the Artifact
58+ # - name: Sign app bundle
59+ # run: |
60+ # jarsigner -keystore app/*.jks \
61+ # -storepass ${{ secrets.KEY_STORE_PASSWORD }} -keypass ${{ secrets.KEY_PASSWORD }} \
62+ # app/build/outputs/bundle/release/app-release.aab ${{ secrets.ALIAS }}
63+ #
64+ # # STEP 2 : Upload the Artifact
65+ # upload:
66+ # needs: [ build ]
67+ # name: Upload the signed artifact
68+ # runs-on: self-hosted
69+ # steps:
70+ # - name: Upload Bundle
71+ # uses: actions/upload-artifact@v2
72+ # with:
73+ # name: signed_app_bundle
74+ # path: app/build/outputs/bundle/release/app-release.aab
75+ #
76+ #
77+ # # Step 3 : Release to playstore
78+ # deploy:
79+ # needs: [ build ]
80+ # name: Create release on Playstore
81+ # runs-on: self-hosted
82+ # steps:
83+ # - name: Create service_account.json
84+ # run: echo '${{ secrets.SERVICE_ACCOUNT_JSON }}' > service_account.json
85+ #
86+ # - name: Deploy to Play Store
87+ # uses: r0adkll/upload-google-play@v1.0.15
88+ # with:
89+ # serviceAccountJson: service_account.json
90+ # packageName: ${{ github.event.inputs.app_id }}
91+ # releaseFiles: app/build/outputs/bundle/release/*.aab
92+ # track: internal
93+ # whatsNewDirectory: whatsnew/
94+ # mappingFile: app/build/outputs/mapping/release/mapping.txt
95+ # inAppUpdatePriority: 5
0 commit comments