From ec84da230f4098aa9760e615f8406d49c31c971e Mon Sep 17 00:00:00 2001 From: Lukasz Modzelewski Date: Mon, 15 Dec 2025 09:11:53 +0100 Subject: [PATCH 1/2] feat: adhoc upload step --- action.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/action.yml b/action.yml index 9f9d52c..0d71668 100644 --- a/action.yml +++ b/action.yml @@ -34,6 +34,10 @@ inputs: re-sign: description: Re-sign the app bundle with new JS bundle required: false + ad-hoc: + description: 'Upload the APK with index.html page' + required: false + default: false keystore-base64: description: 'Base64 version of the release keystore' required: false @@ -320,6 +324,13 @@ runs: echo "ARTIFACT_URL=$(echo "$OUTPUT" | jq -r '.url')" >> $GITHUB_ENV shell: bash + - name: Upload for Ad-hoc distribution + if: ${{ env.PROVIDER_NAME != 'GitHub' && inputs.ad-hoc == 'true' }} + run: | + OUTPUT=$(npx rock remote-cache upload --name ${{ env.ARTIFACT_NAME }} --binary-path "${{ env.ARTIFACT_PATH }}" --json --ad-hoc) || (echo "$OUTPUT" && exit 1) + echo "ARTIFACT_URL=$(echo "$OUTPUT" | jq -r '.url')" >> $GITHUB_ENV + shell: bash + - name: Delete Old Re-Signed Artifacts if: ${{ env.ARTIFACT_URL && inputs.re-sign == 'true' && github.event_name == 'pull_request' }} run: | From 6dd257487f765cd1df3b59d7e183478f5bc40d5f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Pierzcha=C5=82a?= Date: Mon, 15 Dec 2025 11:52:25 +0100 Subject: [PATCH 2/2] Update action.yml --- action.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/action.yml b/action.yml index 0d71668..81878fe 100644 --- a/action.yml +++ b/action.yml @@ -324,6 +324,8 @@ runs: echo "ARTIFACT_URL=$(echo "$OUTPUT" | jq -r '.url')" >> $GITHUB_ENV shell: bash + # For ad-hoc builds, the ARTIFACT_NAME may contain PR-number, while Rock will save the artifact without PR trait in its cache. + # 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. - name: Upload for Ad-hoc distribution if: ${{ env.PROVIDER_NAME != 'GitHub' && inputs.ad-hoc == 'true' }} run: |