4545 name : Build spoofed APK
4646 runs-on : ubuntu-latest
4747 outputs :
48- spoofed_apk_path : ${{ steps.find_apk.outputs.APK_PATH }}
49- spoofed_mapping_path : ${{ steps.find_mapping.outputs.MAPPING_PATH }}
48+ release-name : ${{ steps.release-name.outputs.name }}
5049 steps :
5150 - name : Checkout
5251 uses : actions/checkout@v4.2.2
@@ -101,8 +100,7 @@ jobs:
101100 name : Build un-spoofed APK
102101 runs-on : ubuntu-latest
103102 outputs :
104- apk_path : ${{ steps.find_apk.outputs.APK_PATH }}
105- mapping_path : ${{ steps.normal_mapping.outputs.MAPPING_PATH }}
103+ release-name : ${{ steps.release-name.outputs.name }}
106104 steps :
107105 - name : Parse input
108106 run : |
@@ -162,15 +160,50 @@ jobs:
162160 steps :
163161 - name : Checkout
164162 uses : actions/checkout@v4.2.2
165-
166- - name : Set up JDK
167- uses : actions/setup-java @v4.7.1
163+
164+ - name : Download Un-Spoofed APK
165+ uses : actions/download-artifact @v4
168166 with :
169- distribution : ' zulu'
170- java-version : 21
167+ name : ${{ needs.build.outputs.release-name }}
171168
172- - name : Set up Gradle
173- uses : gradle/actions/setup-gradle@v4.3.1
169+ - name : Download Spoofed APK
170+ uses : actions/download-artifact@v4
171+ with :
172+ name : ${{ needs.spoofed-build.outputs.release-name }}
173+
174+ - name : Download Un-Spoofed Mappings
175+ uses : actions/download-artifact@v4
176+ with :
177+ name : mappings
178+
179+ - name : Download Spoofed Mappings
180+ uses : actions/download-artifact@v4
181+ with :
182+ name : spoofed-mappings
183+
184+ - name : Find normal APK
185+ id : find_normal_apk
186+ run : |
187+ APK_PATH=$(find ${{ needs.build.outputs.release-name }} -name "*.apk" | head -n 1)
188+ echo "APK_PATH=$APK_PATH" >> $GITHUB_OUTPUT
189+
190+ - name : Find spoofed APK
191+ id : find_spoofed_apk
192+ run : |
193+ APK_PATH=$(find ${{ needs.spoofed-build.outputs.release-name }} -name "*.apk" | head -n 1)
194+ echo "APK_PATH=APK_PATH" >> $GITHUB_OUTPUT
195+
196+ - name : Find normal mapping file
197+ id : normal_mapping
198+ run : |
199+ MAPPING_PATH=$(find mappings -name "mapping.txt" | head -n 1)
200+ echo "MAPPING_PATH=$MAPPING_PATH" >> $GITHUB_OUTPUT
201+
202+ - name : Find spoofed mapping file
203+ id : spoofed_mapping
204+ run : |
205+ MAPPING_PATH=$(find spoofed-mappings -name "mapping.txt" | head -n 1)
206+ echo "MAPPING_PATH=$MAPPING_PATH" >> $GITHUB_OUTPUT
174207
175208 - name : Get commit info and build timestamp
176209 id : meta
@@ -199,8 +232,8 @@ jobs:
199232 Type: ${{ env.BUILD_TYPE_CASED }}
200233 [Workflow run](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})
201234 files : |
202- ${{ needs.build .outputs.apk_path }}
203- ${{ needs.spoofed-build .outputs.spoofed_apk_path }}
235+ ${{ steps.find_normal_apk .outputs.APK_PATH }}
236+ ${{ steps.find_spoofed_apk .outputs.SPOOFED_APK_PATH }}
204237 env :
205238 API_ID : ${{ secrets.API_ID }}
206239 API_HASH : ${{ secrets.API_HASH }}
@@ -245,7 +278,7 @@ jobs:
245278 uses : actions/upload-release-asset@v1
246279 with :
247280 upload_url : ${{ steps.create_release.outputs.upload_url }}
248- asset_path : ${{ needs.build .outputs.apk_path }}
281+ asset_path : ${{ steps.find_normal_apk .outputs.APK_PATH }}
249282 asset_name : normal.apk
250283 asset_content_type : application/vnd.android.package-archive
251284 env :
@@ -256,7 +289,7 @@ jobs:
256289 uses : actions/upload-release-asset@v1
257290 with :
258291 upload_url : ${{ steps.create_release.outputs.upload_url }}
259- asset_path : ${{ needs.spoofed-build .outputs.spoofed_apk_path }}
292+ asset_path : ${{ steps.find_spoofed_apk .outputs.APK_PATH }}
260293 asset_name : spoofed.apk
261294 asset_content_type : application/vnd.android.package-archive
262295 env :
@@ -267,7 +300,7 @@ jobs:
267300 uses : actions/upload-release-asset@v1
268301 with :
269302 upload_url : ${{ steps.create_release.outputs.upload_url }}
270- asset_path : ${{ needs.build .outputs.mapping_path }}
303+ asset_path : ${{ steps.normal_mapping .outputs.MAPPING_PATH }}
271304 asset_name : mapping.txt
272305 asset_content_type : text/plain
273306 env :
@@ -278,7 +311,7 @@ jobs:
278311 uses : actions/upload-release-asset@v1
279312 with :
280313 upload_url : ${{ steps.create_release.outputs.upload_url }}
281- asset_path : ${{ needs.spoofed-build .outputs.spoofed_mapping_path }}
314+ asset_path : ${{ steps.spoofed_mapping .outputs.MAPPING_PATH }}
282315 asset_name : spoofed-mapping.txt
283316 asset_content_type : text/plain
284317 env :
0 commit comments