1- name : Publish Release
1+ name : build
22on :
33 release :
44 types : [published]
55
6- workflow_dispatch :
6+ push :
7+ branches :
8+ - main
9+
10+ pull_request :
11+ branches :
12+ - main
713
814env :
915 JAVA_VERSION : 17
5662 tar -czvf mapping.tar.gz --directory=app/build/reproducible/mapping mapping
5763
5864 - name : Sign APKs
65+ if : github.event_name == 'release'
5966 env :
6067 KEYSTORE : ${{ secrets.KEYSTORE }}
6168 KEYALIAS : ${{ secrets.KEYALIAS }}
7784 done
7885 rm keystore.p12
7986
87+ - name : Upload artifacts (workflow run)
88+ if : github.event_name != 'release'
89+ uses : actions/upload-artifact@v4
90+ with :
91+ name : stride-artifacts
92+ path : |
93+ app-armeabi-v7a-release.apk
94+ app-arm64-v8a-release.apk
95+ app-x86_64-release.apk
96+ app-release.apk
97+ mapping.tar.gz
98+
8099 - name : Upload Arifact armeabi-v7a
100+ if : github.event_name == 'release'
81101 uses : svenstaro/upload-release-action@v2
82102 with :
83103 repo_token : ${{ secrets.GITHUB_TOKEN }}
86106 tag : ${{ github.ref }}
87107
88108 - name : Upload Arifact arm64-v8a
109+ if : github.event_name == 'release'
89110 uses : svenstaro/upload-release-action@v2
90111 with :
91112 repo_token : ${{ secrets.GITHUB_TOKEN }}
94115 tag : ${{ github.ref }}
95116
96117 - name : Upload Arifact x86_64
118+ if : github.event_name == 'release'
97119 uses : svenstaro/upload-release-action@v2
98120 with :
99121 repo_token : ${{ secrets.GITHUB_TOKEN }}
@@ -102,6 +124,7 @@ jobs:
102124 tag : ${{ github.ref }}
103125
104126 - name : Upload Arifact Universal
127+ if : github.event_name == 'release'
105128 uses : svenstaro/upload-release-action@v2
106129 with :
107130 repo_token : ${{ secrets.GITHUB_TOKEN }}
@@ -110,6 +133,7 @@ jobs:
110133 tag : ${{ github.ref }}
111134
112135 - name : Upload Arifact Mapping
136+ if : github.event_name == 'release'
113137 uses : svenstaro/upload-release-action@v2
114138 with :
115139 repo_token : ${{ secrets.GITHUB_TOKEN }}
0 commit comments