Skip to content

Commit abd2d35

Browse files
committed
Merge branch 'main' of github.com:LukasMod/android into fix/re-sign-keystore-inpusts
2 parents 600c59c + 25511c6 commit abd2d35

1 file changed

Lines changed: 15 additions & 2 deletions

File tree

action.yml

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@ inputs:
3434
re-sign:
3535
description: Re-sign the app bundle with new JS bundle
3636
required: false
37+
ad-hoc:
38+
description: 'Upload the APK with index.html page'
39+
required: false
40+
default: false
3741
keystore-base64:
3842
description: 'Base64 version of the release keystore'
3943
required: false
@@ -269,7 +273,7 @@ runs:
269273
--keystore-password "${{ inputs.keystore-store-password }}" \
270274
--key-alias "${{ inputs.keystore-key-alias }}" \
271275
--key-password "${{ inputs.keystore-key-password }}"
272-
276+
273277
shell: bash
274278
working-directory: ${{ inputs.working-directory }}
275279

@@ -314,7 +318,7 @@ runs:
314318
- name: Upload Artifact to Remote Cache for re-signed builds
315319
if: ${{ env.PROVIDER_NAME != 'GitHub' && inputs.re-sign == 'true' }}
316320
run: |
317-
OUTPUT=$(npx rock remote-cache upload --name ${{ env.ARTIFACT_NAME }} --binary-path ${{ env.ARTIFACT_PATH }} --json --verbose) || (echo "$OUTPUT" && exit 1)
321+
OUTPUT=$(npx rock remote-cache upload --name ${{ env.ARTIFACT_NAME }} --binary-path "${{ env.ARTIFACT_PATH }}" --json --verbose) || (echo "$OUTPUT" && exit 1)
318322
echo "ARTIFACT_URL=$(echo "$OUTPUT" | jq -r '.url')" >> $GITHUB_ENV
319323
shell: bash
320324

@@ -325,6 +329,15 @@ runs:
325329
echo "ARTIFACT_URL=$(echo "$OUTPUT" | jq -r '.url')" >> $GITHUB_ENV
326330
shell: bash
327331

332+
# For ad-hoc builds, the ARTIFACT_NAME may contain PR-number, while Rock will save the artifact without PR trait in its cache.
333+
# We need to upload the artifact with the PR-number in the name, that's why we use --binary-path with appropriate ARTIFACT_PATH that accounts for it.
334+
- name: Upload for Ad-hoc distribution
335+
if: ${{ env.PROVIDER_NAME != 'GitHub' && inputs.ad-hoc == 'true' }}
336+
run: |
337+
OUTPUT=$(npx rock remote-cache upload --name ${{ env.ARTIFACT_NAME }} --binary-path "${{ env.ARTIFACT_PATH }}" --json --ad-hoc) || (echo "$OUTPUT" && exit 1)
338+
echo "ARTIFACT_URL=$(echo "$OUTPUT" | jq -r '.url')" >> $GITHUB_ENV
339+
shell: bash
340+
328341
- name: Delete Old Re-Signed Artifacts
329342
if: ${{ env.ARTIFACT_URL && inputs.re-sign == 'true' && github.event_name == 'pull_request' }}
330343
run: |

0 commit comments

Comments
 (0)