From 1c5195fb9aed05daaf0614274c226cdf2772c0e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Pierzcha=C5=82a?= Date: Sat, 17 May 2025 13:36:45 +0200 Subject: [PATCH 01/41] experimental: use remote-cache command --- .github/actions/find-artifact/action.yml | 52 -------- .github/actions/find-artifact/index.mjs | 118 ------------------ .github/actions/find-artifact/package.json | 10 -- .../rnef-native-fingerprint/action.yml | 28 ----- .../actions/rnef-native-fingerprint/index.mjs | 31 ----- .../rnef-native-fingerprint/package.json | 10 -- action.yml | 104 +++++++-------- 7 files changed, 53 insertions(+), 300 deletions(-) delete mode 100644 .github/actions/find-artifact/action.yml delete mode 100644 .github/actions/find-artifact/index.mjs delete mode 100644 .github/actions/find-artifact/package.json delete mode 100644 .github/actions/rnef-native-fingerprint/action.yml delete mode 100644 .github/actions/rnef-native-fingerprint/index.mjs delete mode 100644 .github/actions/rnef-native-fingerprint/package.json diff --git a/.github/actions/find-artifact/action.yml b/.github/actions/find-artifact/action.yml deleted file mode 100644 index 5ed13b8..0000000 --- a/.github/actions/find-artifact/action.yml +++ /dev/null @@ -1,52 +0,0 @@ -name: 'Find Artifact' -description: 'Find the latest artifact' -inputs: - name: - description: 'Artifact name' - required: false - re-sign: - description: Re-sign the app bundle with new JS bundle - required: false - pr-number: - description: The pull request number - required: false - github-token: - description: A GitHub Personal Access Token with write access to the project - required: false - default: ${{ github.token }} - repository: - description: - 'The repository owner and the repository name joined together by "/". - If github-token is specified, this is the repository that artifacts will be downloaded from.' - required: false - default: ${{ github.repository }} -outputs: - artifact-id: - description: 'The ID of the artifact' - value: ${{ steps.find-artifact.outputs.artifact-id }} - artifact-url: - description: 'The URL of the artifact' - value: ${{ steps.find-artifact.outputs.artifact-url }} - artifact-ids: - description: 'All IDs of the artifacts matching the name' - value: ${{ steps.find-artifact.outputs.artifact-ids }} - artifact-name: - description: 'The name of the artifact - will append the PR number if the artifact is re-signed' - value: ${{ steps.find-artifact.outputs.artifact-name }} -runs: - using: 'composite' - steps: - - name: Install dependencies - run: npm install - shell: bash - working-directory: ${{ github.action_path }} - - name: Find artifact - id: find-artifact - env: - INPUT_NAME: ${{ inputs.name }} - INPUT_RE_SIGN: ${{ inputs.re-sign }} - INPUT_GITHUB_TOKEN: ${{ inputs.github-token }} - INPUT_REPOSITORY: ${{ inputs.repository }} - INPUT_PR_NUMBER: ${{ inputs.pr-number }} - run: node ${{ github.action_path }}/index.mjs - shell: bash diff --git a/.github/actions/find-artifact/index.mjs b/.github/actions/find-artifact/index.mjs deleted file mode 100644 index 5a588c9..0000000 --- a/.github/actions/find-artifact/index.mjs +++ /dev/null @@ -1,118 +0,0 @@ -import * as core from "@actions/core"; -import * as github from "@actions/github"; - -const perPage = 100; // Maximum allowed by GitHub API - -async function fetchArtifacts(octokit, repository, name) { - const result = []; - let page = 1; - - while (true) { - const response = await octokit.rest.actions.listArtifactsForRepo({ - owner: repository.split("/")[0], - repo: repository.split("/")[1], - name, - per_page: perPage, - page, - }); - - const artifacts = response.data.artifacts; - result.push(...artifacts); - - if (artifacts.length < perPage) { - break; - } - - page++; - } - - result.sort((a, b) => new Date(b.expires_at) - new Date(a.expires_at)); - return result; -} - -async function run() { - try { - const token = core.getInput("github_token") || process.env.GITHUB_TOKEN; - - if (!token) { - throw new Error("GitHub token is required"); - } - - const repository = core.getInput("repository"); - if (!repository) { - throw new Error("Repository is required"); - } - - const name = core.getInput("name"); - if (!name) { - throw new Error("Artifact name is required"); - } - - const reSign = core.getInput("re_sign"); - const prNumber = core.getInput("pr_number"); - - const octokit = github.getOctokit(token); - const artifactsByName = await fetchArtifacts(octokit, repository, name); - const artifactsByPrNumber = - prNumber && reSign - ? await fetchArtifacts(octokit, repository, `${name}-${prNumber}`) - : []; - const artifacts = [...artifactsByPrNumber, ...artifactsByName]; - - if (artifacts.length === 0) { - return; - } - - console.log(`Found ${artifacts.length} related artifacts:`); - for (const artifact of artifacts) { - console.log( - `- ID: ${artifact.id}, Name: ${artifact.name}, Size: ${formatSize( - artifact.size_in_bytes - )}, Expires at: ${artifact.expires_at}` - ); - } - - const firstArtifact = artifacts.find((artifact) => !artifact.expired); - console.log(`First artifact: ${JSON.stringify(firstArtifact, null, 2)}`); - - const url = formatDownloadUrl( - repository, - firstArtifact.workflow_run.id, - firstArtifact.id - ); - console.log("Stable download URL:", url); - - let artifactName = name; - // There are artifacts from PR but the base artifact is gone, recreate with the original name - if (artifactsByName.length === 0) { - artifactName = name; - // First time an artifact is re-signed, it's not yet in artifact storage, setting the name explicitly. - } else if (prNumber && reSign) { - artifactName = `${name}-${prNumber}`; - } - core.setOutput("artifact-name", artifactName); - core.setOutput("artifact-id", firstArtifact.id); - core.setOutput("artifact-url", url); - core.setOutput( - "artifact-ids", - artifactsByPrNumber.map((artifact) => artifact.id).join(" ") - ); - } catch (error) { - core.setFailed(`Action failed with error: ${error.message}`); - } -} - -// The artifact URL returned by the GitHub API expires in 1 minute, we need to generate a permanent one. -function formatDownloadUrl(repository, workflowRunId, artifactId) { - return `https://github.com/${repository}/actions/runs/${workflowRunId}/artifacts/${artifactId}`; -} - -function formatSize(size) { - if (size > 0.75 * 1024 * 1024) { - return `${(size / 1024 / 1024).toFixed(2)} MB`; - } - - return `${(size / 1024).toFixed(2)} KB`; -} - -run(); diff --git a/.github/actions/find-artifact/package.json b/.github/actions/find-artifact/package.json deleted file mode 100644 index d1e86da..0000000 --- a/.github/actions/find-artifact/package.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "name": "find-artifact", - "version": "1.0.0", - "description": "Find existing artifact for RNEF builds", - "main": "index.js", - "dependencies": { - "@actions/core": "^1.11.1", - "@actions/github": "^6.0.0" - } -} diff --git a/.github/actions/rnef-native-fingerprint/action.yml b/.github/actions/rnef-native-fingerprint/action.yml deleted file mode 100644 index aec7103..0000000 --- a/.github/actions/rnef-native-fingerprint/action.yml +++ /dev/null @@ -1,28 +0,0 @@ -name: 'Fingerprint' -description: 'Fingerprint the current native-related files' -inputs: - platform: - description: 'The platform to fingerprint: android or ios' - required: true - working-directory: - description: 'The working directory to fingerprint, where the rnef.config.mjs is located' - required: true - default: '.' -outputs: - hash: - description: 'The fingerprint hash' - value: ${{ steps.fingerprint.outputs.hash }} -runs: - using: 'composite' - steps: - - name: Install dependencies - run: npm install - shell: bash - working-directory: ${{ github.action_path }} - - name: Run fingerprint - id: fingerprint - env: - INPUT_PLATFORM: ${{ inputs.platform }} - INPUT_WORKING_DIRECTORY: ${{ inputs.working-directory }} - run: node ${{ github.action_path }}/index.mjs - shell: bash diff --git a/.github/actions/rnef-native-fingerprint/index.mjs b/.github/actions/rnef-native-fingerprint/index.mjs deleted file mode 100644 index 54e8d35..0000000 --- a/.github/actions/rnef-native-fingerprint/index.mjs +++ /dev/null @@ -1,31 +0,0 @@ -import path from "node:path"; -import core from "@actions/core"; -import { getConfig } from "@rnef/config"; -import { nativeFingerprint } from "@rnef/tools"; - -const ALLOWED_PLATFORMS = ["android", "ios"]; - -async function run() { - const platform = core.getInput("platform"); - const workingDirectory = core.getInput("working_directory"); - if (!ALLOWED_PLATFORMS.includes(platform)) { - throw new Error(`Invalid platform: ${platform}`); - } - const dir = path.isAbsolute(workingDirectory) - ? workingDirectory - : path.join(process.cwd(), workingDirectory); - const config = await getConfig(dir, []); - const fingerprintOptions = config.getFingerprintOptions(); - - const fingerprint = await nativeFingerprint(dir, { - platform, - ...fingerprintOptions, - }); - - console.log("Hash:", fingerprint.hash); - console.log("Sources:", fingerprint.sources); - - core.setOutput("hash", fingerprint.hash); -} - -await run(); diff --git a/.github/actions/rnef-native-fingerprint/package.json b/.github/actions/rnef-native-fingerprint/package.json deleted file mode 100644 index f5a6069..0000000 --- a/.github/actions/rnef-native-fingerprint/package.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "name": "rnef-native-fingerprint", - "version": "1.0.0", - "description": "Generate native fingerprint for RNEF builds", - "main": "index.mjs", - "dependencies": { - "@rnef/config": "^0.7.18", - "@actions/core": "^1.11.1" - } -} diff --git a/action.yml b/action.yml index 8649cd7..d793aa6 100644 --- a/action.yml +++ b/action.yml @@ -1,22 +1,22 @@ -name: 'Remote Build - iOS' -description: 'Github implementation of the RNEF Remote Build for iOS' +name: "Remote Build - iOS" +description: "Github implementation of the RNEF Remote Build for iOS" branding: - icon: 'box' - color: 'blue' + icon: "box" + color: "blue" inputs: github-token: description: GitHub Token required: true working-directory: - description: 'Working directory for the build command' + description: "Working directory for the build command" required: false - default: '.' + default: "." destination: description: 'Destination to build to: "simulator" or "device". Using "device" runs "rnef build:ios --archive" and code signing settings (certificate, provisioning profile, keychain password) are required.' required: true - default: 'simulator' # 'simulator' or 'device' + default: "simulator" # 'simulator' or 'device' scheme: description: Xcode scheme required: true @@ -27,38 +27,38 @@ inputs: description: Re-sign the app bundle with new JS bundle required: false certificate-base64: - description: '[Device Builds] Base64 encoded P12 file containing Apple certificate (incl. private key)' + description: "[Device Builds] Base64 encoded P12 file containing Apple certificate (incl. private key)" required: false certificate-password: - description: '[Device Builds] Password for the P12 file containing the Apple certificate' + description: "[Device Builds] Password for the P12 file containing the Apple certificate" required: false provisioning-profile-base64: - description: '[Device Builds] Base64 encoded Apple provisioning profile (*.mobileprovision)' + description: "[Device Builds] Base64 encoded Apple provisioning profile (*.mobileprovision)" required: false provisioning-profile-name: - description: '[Device Builds] Name of the Apple provisioning profile (without .mobileprovision extension)' + description: "[Device Builds] Name of the Apple provisioning profile (without .mobileprovision extension)" required: false keychain-password: - description: '[Device Builds] Password that will protect temporary keychain used for signing (can be a random string)' + description: "[Device Builds] Password that will protect temporary keychain used for signing (can be a random string)" required: false rnef-build-extra-params: description: 'Extra parameters to pass to "rnef build:ios"' required: false comment-bot: - description: 'Whether to send a comment under PR with the link to the generated build' + description: "Whether to send a comment under PR with the link to the generated build" required: false default: true outputs: artifact-url: - description: 'URL of the relevant iOS build artifact (could be cached)' + description: "URL of the relevant iOS build artifact (could be cached)" value: ${{ steps.upload-artifact.outputs.artifact-url || (steps.find-artifact.outcome == 'success' && steps.find-artifact.outputs.artifact-url) }} artifact-id: - description: 'ID of the relevant iOS build artifact (could be cached)' + description: "ID of the relevant iOS build artifact (could be cached)" value: ${{ steps.upload-artifact.outputs.artifact-id || (steps.find-artifact.outcome == 'success' && steps.find-artifact.outputs.artifact-id) }} runs: - using: 'composite' + using: "composite" steps: - name: Validate inputs run: | @@ -97,24 +97,37 @@ runs: - name: Native Fingerprint id: fingerprint - uses: callstackincubator/ios/.github/actions/rnef-native-fingerprint@v1 - with: - platform: ios - working-directory: ${{ inputs.working-directory }} + run: | + FINGERPRINT=$(npx rnef fingerprint -p ios --raw --verbose) + echo $FINGERPRINT + shell: bash + working-directory: ${{ inputs.working-directory }} - - name: Set Artifact Name + - name: Set Artifact Traits run: | - echo "ARTIFACT_NAME=rnef-ios-${{ inputs.destination }}-${{ inputs.configuration }}-${{ steps.fingerprint.outputs.hash}}" >> $GITHUB_ENV + if ${{ inputs.re-sign == 'true' && github.event_name == 'pull_request' }} + echo "ARTIFACT_TRAITS=rnef-ios-${{ inputs.destination }}-${{ inputs.configuration }}-${{ env.FINGERPRINT }}-${{ github.event.pull_request.number}}" >> $GITHUB_ENV + else + echo "ARTIFACT_TRAITS=rnef-ios-${{ inputs.destination }}-${{ inputs.configuration }}-${{ env.FINGERPRINT }}" >> $GITHUB_ENV + fi shell: bash - name: Find artifact URL id: find-artifact - uses: callstackincubator/ios/.github/actions/find-artifact@v1 - with: - name: ${{ env.ARTIFACT_NAME }} - re-sign: ${{ inputs.re-sign }} - github-token: ${{ inputs.github-token }} - pr-number: ${{ github.event.pull_request.number }} + run: | + OUTPUT=$(npx rnef remote-cache list -p ios --traits $ARTIFACT_TRAITS --json) + if ${{ inputs.re-sign == 'true' && github.event_name == 'pull_request' }} + echo "ARTIFACT_TRAITS=rnef-ios-${{ inputs.destination }}-${{ inputs.configuration }}-${{ env.FINGERPRINT }}-${{ github.event.pull_request.number}}" >> $GITHUB_ENV + else + echo "ARTIFACT_TRAITS=rnef-ios-${{ inputs.destination }}-${{ inputs.configuration }}-${{ env.FINGERPRINT }}" >> $GITHUB_ENV + fi + echo "ARTIFACT_URL=$(echo "$OUTPUT" | jq -r '.url')" >> $GITHUB_ENV + echo "ARTIFACT_ID=$(echo "$OUTPUT" | jq -r '.id')" >> $GITHUB_ENV + echo "ARTIFACT_NAME=rnef-ios-$ARTIFACT_TRAITS" >> $GITHUB_ENV + shell: bash + output: + artifact-url: ${{ env.ARTIFACT_URL }} + artifact-id: ${{ env.ARTIFACT_ID }} - name: Set Provisioning Profile Path run: | @@ -198,18 +211,7 @@ runs: - name: Download and Unpack IPA if: ${{ steps.find-artifact.outputs.artifact-url && inputs.destination == 'device' && inputs.re-sign == 'true' && github.event_name == 'pull_request' }} run: | - curl -L -H "Authorization: token ${{ inputs.github-token }}" \ - -o artifact.zip \ - "https://api.github.com/repos/${{ github.repository }}/actions/artifacts/${{ steps.find-artifact.outputs.artifact-id }}/zip" - - unzip artifact.zip -d downloaded-artifacts - ls -l downloaded-artifacts - - IPA_PATH=$(find downloaded-artifacts -name "*.ipa" -print -quit) - if [ -z "$IPA_PATH" ]; then - echo "No IPA file found in the extracted contents." - exit 1 - fi + IPA_PATH=$(npx rnef remote-cache download -p ios --traits $ARTIFACT_TRAITS --json) echo "ARTIFACT_PATH=$IPA_PATH" >> $GITHUB_ENV shell: bash @@ -225,12 +227,16 @@ runs: # Find artifact URL again before uploading, as other concurrent workflows could upload the same artifact - name: Find artifact URL again before uploading id: find-artifact-after-build - uses: callstackincubator/ios/.github/actions/find-artifact@v1 - with: - name: ${{ env.ARTIFACT_NAME }} - re-sign: ${{ inputs.re-sign }} - github-token: ${{ inputs.github-token }} - pr-number: ${{ github.event.pull_request.number }} + run: | + OUTPUT=$(npx rnef remote-cache list -p ios --traits $ARTIFACT_TRAITS --json) + echo "ARTIFACT_URL=$(echo "$OUTPUT" | jq -r '.url')" >> $GITHUB_ENV + echo "ARTIFACT_ID=$(echo "$OUTPUT" | jq -r '.id')" >> $GITHUB_ENV + echo "ARTIFACT_NAME=$(echo "$OUTPUT" | jq -r '.name')" >> $GITHUB_ENV + shell: bash + output: + artifact-url: ${{ env.ARTIFACT_URL }} + artifact-id: ${{ env.ARTIFACT_ID }} + artifact-name: ${{ env.ARTIFACT_NAME }} - name: Upload Artifact id: upload-artifact @@ -244,11 +250,7 @@ runs: - name: Delete Old Re-Signed Artifacts if: ${{ steps.find-artifact-after-build.outputs.artifact-url && inputs.destination == 'device' && inputs.re-sign == 'true' && github.event_name == 'pull_request' }} run: | - for ID in ${{ steps.find-artifact-after-build.outputs.artifact-ids }}; do - echo "Deleting artifact with ID: $ID" - curl -X DELETE -H "Authorization: token ${{ inputs.github-token }}" \ - "https://api.github.com/repos/${{ github.repository }}/actions/artifacts/$ID" - done + npx rnef remote-cache delete -p ios --traits $ARTIFACT_TRAITS --json shell: bash - name: Clean Up Code Signing (device builds only) From c63d9654bfb8a35223eca728aabf5178e1b4c212 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Pierzcha=C5=82a?= Date: Sat, 17 May 2025 14:17:15 +0200 Subject: [PATCH 02/41] revert quotes, remove unused traits --- action.yml | 41 ++++++++++++++++------------------------- 1 file changed, 16 insertions(+), 25 deletions(-) diff --git a/action.yml b/action.yml index d793aa6..0bc5d08 100644 --- a/action.yml +++ b/action.yml @@ -1,22 +1,22 @@ -name: "Remote Build - iOS" -description: "Github implementation of the RNEF Remote Build for iOS" +name: 'Remote Build - iOS' +description: 'Github implementation of the RNEF Remote Build for iOS' branding: - icon: "box" - color: "blue" + icon: 'box' + color: 'blue' inputs: github-token: description: GitHub Token required: true working-directory: - description: "Working directory for the build command" + description: 'Working directory for the build command' required: false - default: "." + default: '.' destination: description: 'Destination to build to: "simulator" or "device". Using "device" runs "rnef build:ios --archive" and code signing settings (certificate, provisioning profile, keychain password) are required.' required: true - default: "simulator" # 'simulator' or 'device' + default: 'simulator' # 'simulator' or 'device' scheme: description: Xcode scheme required: true @@ -27,38 +27,38 @@ inputs: description: Re-sign the app bundle with new JS bundle required: false certificate-base64: - description: "[Device Builds] Base64 encoded P12 file containing Apple certificate (incl. private key)" + description: '[Device Builds] Base64 encoded P12 file containing Apple certificate (incl. private key)' required: false certificate-password: - description: "[Device Builds] Password for the P12 file containing the Apple certificate" + description: '[Device Builds] Password for the P12 file containing the Apple certificate' required: false provisioning-profile-base64: - description: "[Device Builds] Base64 encoded Apple provisioning profile (*.mobileprovision)" + description: '[Device Builds] Base64 encoded Apple provisioning profile (*.mobileprovision)' required: false provisioning-profile-name: - description: "[Device Builds] Name of the Apple provisioning profile (without .mobileprovision extension)" + description: '[Device Builds] Name of the Apple provisioning profile (without .mobileprovision extension)' required: false keychain-password: - description: "[Device Builds] Password that will protect temporary keychain used for signing (can be a random string)" + description: '[Device Builds] Password that will protect temporary keychain used for signing (can be a random string)' required: false rnef-build-extra-params: description: 'Extra parameters to pass to "rnef build:ios"' required: false comment-bot: - description: "Whether to send a comment under PR with the link to the generated build" + description: 'Whether to send a comment under PR with the link to the generated build' required: false default: true outputs: artifact-url: - description: "URL of the relevant iOS build artifact (could be cached)" + description: 'URL of the relevant iOS build artifact (could be cached)' value: ${{ steps.upload-artifact.outputs.artifact-url || (steps.find-artifact.outcome == 'success' && steps.find-artifact.outputs.artifact-url) }} artifact-id: - description: "ID of the relevant iOS build artifact (could be cached)" + description: 'ID of the relevant iOS build artifact (could be cached)' value: ${{ steps.upload-artifact.outputs.artifact-id || (steps.find-artifact.outcome == 'success' && steps.find-artifact.outputs.artifact-id) }} runs: - using: "composite" + using: 'composite' steps: - name: Validate inputs run: | @@ -103,15 +103,6 @@ runs: shell: bash working-directory: ${{ inputs.working-directory }} - - name: Set Artifact Traits - run: | - if ${{ inputs.re-sign == 'true' && github.event_name == 'pull_request' }} - echo "ARTIFACT_TRAITS=rnef-ios-${{ inputs.destination }}-${{ inputs.configuration }}-${{ env.FINGERPRINT }}-${{ github.event.pull_request.number}}" >> $GITHUB_ENV - else - echo "ARTIFACT_TRAITS=rnef-ios-${{ inputs.destination }}-${{ inputs.configuration }}-${{ env.FINGERPRINT }}" >> $GITHUB_ENV - fi - shell: bash - - name: Find artifact URL id: find-artifact run: | From 86a9da296fa2a01e1bf9d4ba9d05fa90952389bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Pierzcha=C5=82a?= Date: Sat, 17 May 2025 14:18:01 +0200 Subject: [PATCH 03/41] tmp: change branch for internal action --- action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.yml b/action.yml index 0bc5d08..5c0d0b1 100644 --- a/action.yml +++ b/action.yml @@ -257,7 +257,7 @@ runs: - name: Post Build if: ${{ github.event_name == 'pull_request' && inputs.comment-bot == 'true' }} - uses: callstackincubator/ios/.github/actions/rnef-post-build@v1 + uses: callstackincubator/ios/.github/actions/rnef-post-build@feat/remote-cache-command with: title: iOS ${{ inputs.configuration }} ${{ inputs.destination == 'simulator' && 'APP for simulators' || 'IPA for physical devices' }} artifact-url: ${{ steps.upload-artifact.outputs.artifact-url || steps.find-artifact-after-build.outputs.artifact-url }} From 3adea91869ae6f8bba10fdccb9a08beada86f3b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Pierzcha=C5=82a?= Date: Sat, 17 May 2025 14:28:47 +0200 Subject: [PATCH 04/41] cleanup find-artifact --- action.yml | 43 +++++++++++++++++-------------------------- 1 file changed, 17 insertions(+), 26 deletions(-) diff --git a/action.yml b/action.yml index 5c0d0b1..14bdf0e 100644 --- a/action.yml +++ b/action.yml @@ -52,10 +52,10 @@ inputs: outputs: artifact-url: description: 'URL of the relevant iOS build artifact (could be cached)' - value: ${{ steps.upload-artifact.outputs.artifact-url || (steps.find-artifact.outcome == 'success' && steps.find-artifact.outputs.artifact-url) }} + value: ${{ steps.upload-artifact.outputs.artifact-url || env.ARTIFACT_URL }} artifact-id: description: 'ID of the relevant iOS build artifact (could be cached)' - value: ${{ steps.upload-artifact.outputs.artifact-id || (steps.find-artifact.outcome == 'success' && steps.find-artifact.outputs.artifact-id) }} + value: ${{ steps.upload-artifact.outputs.artifact-id || env.ARTIFACT_ID }} runs: using: 'composite' @@ -104,21 +104,17 @@ runs: working-directory: ${{ inputs.working-directory }} - name: Find artifact URL - id: find-artifact run: | - OUTPUT=$(npx rnef remote-cache list -p ios --traits $ARTIFACT_TRAITS --json) if ${{ inputs.re-sign == 'true' && github.event_name == 'pull_request' }} - echo "ARTIFACT_TRAITS=rnef-ios-${{ inputs.destination }}-${{ inputs.configuration }}-${{ env.FINGERPRINT }}-${{ github.event.pull_request.number}}" >> $GITHUB_ENV + echo "ARTIFACT_TRAITS=${{ inputs.destination }}-${{ inputs.configuration }}-${{ env.FINGERPRINT }}-${{ github.event.pull_request.number}}" >> $GITHUB_ENV else - echo "ARTIFACT_TRAITS=rnef-ios-${{ inputs.destination }}-${{ inputs.configuration }}-${{ env.FINGERPRINT }}" >> $GITHUB_ENV + echo "ARTIFACT_TRAITS=${{ inputs.destination }}-${{ inputs.configuration }}-${{ env.FINGERPRINT }}" >> $GITHUB_ENV fi + OUTPUT=$(npx rnef remote-cache list -p ios --traits $ARTIFACT_TRAITS --json) echo "ARTIFACT_URL=$(echo "$OUTPUT" | jq -r '.url')" >> $GITHUB_ENV echo "ARTIFACT_ID=$(echo "$OUTPUT" | jq -r '.id')" >> $GITHUB_ENV echo "ARTIFACT_NAME=rnef-ios-$ARTIFACT_TRAITS" >> $GITHUB_ENV shell: bash - output: - artifact-url: ${{ env.ARTIFACT_URL }} - artifact-id: ${{ env.ARTIFACT_ID }} - name: Set Provisioning Profile Path run: | @@ -126,7 +122,7 @@ runs: shell: bash - name: Setup Code Signing (device builds only) - if: ${{ inputs.re-sign == 'true' || (!steps.find-artifact.outputs.artifact-url && inputs.destination == 'device') }} + if: ${{ inputs.re-sign == 'true' || (!env.ARTIFACT_URL && inputs.destination == 'device') }} run: | # Create temporary keychain KEYCHAIN_PATH=$RUNNER_TEMP/app-signing.keychain-db @@ -157,7 +153,7 @@ runs: shell: bash - name: Determine iOS sourceDir - if: ${{ !steps.find-artifact.outputs.artifact-url }} + if: ${{ !env.ARTIFACT_URL }} run: | JSON_OUTPUT=$(npx rnef config -p ios) echo "$JSON_OUTPUT" | jq -r '.project' @@ -167,7 +163,7 @@ runs: working-directory: ${{ inputs.working-directory }} - name: Build iOS - if: ${{ !steps.find-artifact.outputs.artifact-url }} + if: ${{ !env.ARTIFACT_URL }} run: | npx rnef build:ios \ ${{ inputs.destination == 'device' && '--archive' || '' }} \ @@ -180,7 +176,7 @@ runs: working-directory: ${{ inputs.working-directory }} - name: Find Build Artifact - if: ${{ !steps.find-artifact.outputs.artifact-url }} + if: ${{ !env.ARTIFACT_URL }} run: | if [ "${{ inputs.destination }}" == "device" ]; then IPA_PATH=$(find .rnef/cache/ios/export -maxdepth 1 -name '*.ipa' -type f | head -1) @@ -200,14 +196,14 @@ runs: shell: bash - name: Download and Unpack IPA - if: ${{ steps.find-artifact.outputs.artifact-url && inputs.destination == 'device' && inputs.re-sign == 'true' && github.event_name == 'pull_request' }} + if: ${{ env.ARTIFACT_URL && inputs.destination == 'device' && inputs.re-sign == 'true' && github.event_name == 'pull_request' }} run: | IPA_PATH=$(npx rnef remote-cache download -p ios --traits $ARTIFACT_TRAITS --json) echo "ARTIFACT_PATH=$IPA_PATH" >> $GITHUB_ENV shell: bash - name: Re-sign IPA - if: ${{ steps.find-artifact.outputs.artifact-url && inputs.destination == 'device' && inputs.re-sign == 'true' && github.event_name == 'pull_request' }} + if: ${{ env.ARTIFACT_URL && inputs.destination == 'device' && inputs.re-sign == 'true' && github.event_name == 'pull_request' }} run: | npx rnef sign:ios ${{ env.ARTIFACT_PATH }} \ --build-jsbundle \ @@ -217,35 +213,30 @@ runs: # Find artifact URL again before uploading, as other concurrent workflows could upload the same artifact - name: Find artifact URL again before uploading - id: find-artifact-after-build run: | OUTPUT=$(npx rnef remote-cache list -p ios --traits $ARTIFACT_TRAITS --json) echo "ARTIFACT_URL=$(echo "$OUTPUT" | jq -r '.url')" >> $GITHUB_ENV echo "ARTIFACT_ID=$(echo "$OUTPUT" | jq -r '.id')" >> $GITHUB_ENV - echo "ARTIFACT_NAME=$(echo "$OUTPUT" | jq -r '.name')" >> $GITHUB_ENV + echo "ARTIFACT_NAME=rnef-ios-$ARTIFACT_TRAITS" >> $GITHUB_ENV shell: bash - output: - artifact-url: ${{ env.ARTIFACT_URL }} - artifact-id: ${{ env.ARTIFACT_ID }} - artifact-name: ${{ env.ARTIFACT_NAME }} - name: Upload Artifact id: upload-artifact - if: ${{ !steps.find-artifact-after-build.outputs.artifact-url || (inputs.re-sign == 'true' && github.event_name == 'pull_request') }} + if: ${{ !env.ARTIFACT_URL || (inputs.re-sign == 'true' && github.event_name == 'pull_request') }} uses: actions/upload-artifact@v4 with: - name: ${{ steps.find-artifact-after-build.outputs.artifact-name || env.ARTIFACT_NAME }} + name: ${{ env.ARTIFACT_NAME }} path: ${{ env.ARTIFACT_PATH }} if-no-files-found: error - name: Delete Old Re-Signed Artifacts - if: ${{ steps.find-artifact-after-build.outputs.artifact-url && inputs.destination == 'device' && inputs.re-sign == 'true' && github.event_name == 'pull_request' }} + if: ${{ env.ARTIFACT_URL && inputs.destination == 'device' && inputs.re-sign == 'true' && github.event_name == 'pull_request' }} run: | npx rnef remote-cache delete -p ios --traits $ARTIFACT_TRAITS --json shell: bash - name: Clean Up Code Signing (device builds only) - if: ${{ !steps.find-artifact-after-build.outputs.artifact-url && inputs.destination == 'device' }} + if: ${{ !env.ARTIFACT_URL && inputs.destination == 'device' }} run: | KEYCHAIN_PATH=$RUNNER_TEMP/app-signing.keychain-db security delete-keychain "$KEYCHAIN_PATH" @@ -260,5 +251,5 @@ runs: uses: callstackincubator/ios/.github/actions/rnef-post-build@feat/remote-cache-command with: title: iOS ${{ inputs.configuration }} ${{ inputs.destination == 'simulator' && 'APP for simulators' || 'IPA for physical devices' }} - artifact-url: ${{ steps.upload-artifact.outputs.artifact-url || steps.find-artifact-after-build.outputs.artifact-url }} + artifact-url: ${{ steps.upload-artifact.outputs.artifact-url || env.ARTIFACT_URL }} github-token: ${{ inputs.github-token }} From 4699d050b19818f95fe67b7496264aa76cf680e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Pierzcha=C5=82a?= Date: Sat, 17 May 2025 14:45:43 +0200 Subject: [PATCH 05/41] fixes --- action.yml | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/action.yml b/action.yml index 14bdf0e..b371c4a 100644 --- a/action.yml +++ b/action.yml @@ -98,22 +98,26 @@ runs: - name: Native Fingerprint id: fingerprint run: | - FINGERPRINT=$(npx rnef fingerprint -p ios --raw --verbose) + FINGERPRINT=$(npx rnef fingerprint -p ios --verbose | grep -oE '[a-f0-9]{40}') echo $FINGERPRINT shell: bash working-directory: ${{ inputs.working-directory }} - - name: Find artifact URL + - name: Set Artifact Traits run: | if ${{ inputs.re-sign == 'true' && github.event_name == 'pull_request' }} - echo "ARTIFACT_TRAITS=${{ inputs.destination }}-${{ inputs.configuration }}-${{ env.FINGERPRINT }}-${{ github.event.pull_request.number}}" >> $GITHUB_ENV + echo "ARTIFACT_TRAITS=${{ inputs.destination }},${{ inputs.configuration }},${{ env.FINGERPRINT }},${{ github.event.pull_request.number}}" >> $GITHUB_ENV else - echo "ARTIFACT_TRAITS=${{ inputs.destination }}-${{ inputs.configuration }}-${{ env.FINGERPRINT }}" >> $GITHUB_ENV + echo "ARTIFACT_TRAITS=${{ inputs.destination }},${{ inputs.configuration }},${{ env.FINGERPRINT }}" >> $GITHUB_ENV fi - OUTPUT=$(npx rnef remote-cache list -p ios --traits $ARTIFACT_TRAITS --json) + # Transform commas to hyphens + ARTIFACT_TRAITS_HYPHENATED=$(echo "$ARTIFACT_TRAITS" | tr ',' '-') + echo "ARTIFACT_TRAITS_HYPHENATED=$ARTIFACT_TRAITS_HYPHENATED" >> $GITHUB_ENV + OUTPUT=$(npx rnef remote-cache list -p ios --traits "$ARTIFACT_TRAITS" --json) + echo "ARTIFACT_URL=$(echo "$OUTPUT" | jq -r '.url')" >> $GITHUB_ENV echo "ARTIFACT_ID=$(echo "$OUTPUT" | jq -r '.id')" >> $GITHUB_ENV - echo "ARTIFACT_NAME=rnef-ios-$ARTIFACT_TRAITS" >> $GITHUB_ENV + echo "ARTIFACT_NAME=rnef-ios-$ARTIFACT_TRAITS_HYPHENATED" >> $GITHUB_ENV shell: bash - name: Set Provisioning Profile Path @@ -198,7 +202,7 @@ runs: - name: Download and Unpack IPA if: ${{ env.ARTIFACT_URL && inputs.destination == 'device' && inputs.re-sign == 'true' && github.event_name == 'pull_request' }} run: | - IPA_PATH=$(npx rnef remote-cache download -p ios --traits $ARTIFACT_TRAITS --json) + IPA_PATH=$(npx rnef remote-cache download -p ios --traits "$ARTIFACT_TRAITS" --json) echo "ARTIFACT_PATH=$IPA_PATH" >> $GITHUB_ENV shell: bash @@ -214,10 +218,10 @@ runs: # Find artifact URL again before uploading, as other concurrent workflows could upload the same artifact - name: Find artifact URL again before uploading run: | - OUTPUT=$(npx rnef remote-cache list -p ios --traits $ARTIFACT_TRAITS --json) + OUTPUT=$(npx rnef remote-cache list -p ios --traits "$ARTIFACT_TRAITS" --json) echo "ARTIFACT_URL=$(echo "$OUTPUT" | jq -r '.url')" >> $GITHUB_ENV echo "ARTIFACT_ID=$(echo "$OUTPUT" | jq -r '.id')" >> $GITHUB_ENV - echo "ARTIFACT_NAME=rnef-ios-$ARTIFACT_TRAITS" >> $GITHUB_ENV + echo "ARTIFACT_NAME=rnef-ios-$ARTIFACT_TRAITS_HYPHENATED" >> $GITHUB_ENV shell: bash - name: Upload Artifact From f2a06cd2ba45c1b64e39bdfa0ee03e444028da79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Pierzcha=C5=82a?= Date: Sat, 17 May 2025 14:49:35 +0200 Subject: [PATCH 06/41] fixup --- action.yml | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/action.yml b/action.yml index b371c4a..75b27e2 100644 --- a/action.yml +++ b/action.yml @@ -99,25 +99,24 @@ runs: id: fingerprint run: | FINGERPRINT=$(npx rnef fingerprint -p ios --verbose | grep -oE '[a-f0-9]{40}') - echo $FINGERPRINT + echo "FINGERPRINT=$FINGERPRINT" >> $GITHUB_ENV shell: bash working-directory: ${{ inputs.working-directory }} - name: Set Artifact Traits run: | if ${{ inputs.re-sign == 'true' && github.event_name == 'pull_request' }} - echo "ARTIFACT_TRAITS=${{ inputs.destination }},${{ inputs.configuration }},${{ env.FINGERPRINT }},${{ github.event.pull_request.number}}" >> $GITHUB_ENV + echo "ARTIFACT_TRAITS=${{ inputs.destination }},${{ inputs.configuration }},${{ github.event.pull_request.number}}" >> $GITHUB_ENV else - echo "ARTIFACT_TRAITS=${{ inputs.destination }},${{ inputs.configuration }},${{ env.FINGERPRINT }}" >> $GITHUB_ENV + echo "ARTIFACT_TRAITS=${{ inputs.destination }},${{ inputs.configuration }}" >> $GITHUB_ENV fi # Transform commas to hyphens ARTIFACT_TRAITS_HYPHENATED=$(echo "$ARTIFACT_TRAITS" | tr ',' '-') - echo "ARTIFACT_TRAITS_HYPHENATED=$ARTIFACT_TRAITS_HYPHENATED" >> $GITHUB_ENV + ARTIFACT_TRAITS_HYPHENATED_FINGERPRINT=$ARTIFACT_TRAITS_HYPHENATED-$FINGERPRINT OUTPUT=$(npx rnef remote-cache list -p ios --traits "$ARTIFACT_TRAITS" --json) - echo "ARTIFACT_URL=$(echo "$OUTPUT" | jq -r '.url')" >> $GITHUB_ENV echo "ARTIFACT_ID=$(echo "$OUTPUT" | jq -r '.id')" >> $GITHUB_ENV - echo "ARTIFACT_NAME=rnef-ios-$ARTIFACT_TRAITS_HYPHENATED" >> $GITHUB_ENV + echo "ARTIFACT_NAME=rnef-ios-$ARTIFACT_TRAITS_HYPHENATED_FINGERPRINT" >> $GITHUB_ENV shell: bash - name: Set Provisioning Profile Path @@ -221,7 +220,6 @@ runs: OUTPUT=$(npx rnef remote-cache list -p ios --traits "$ARTIFACT_TRAITS" --json) echo "ARTIFACT_URL=$(echo "$OUTPUT" | jq -r '.url')" >> $GITHUB_ENV echo "ARTIFACT_ID=$(echo "$OUTPUT" | jq -r '.id')" >> $GITHUB_ENV - echo "ARTIFACT_NAME=rnef-ios-$ARTIFACT_TRAITS_HYPHENATED" >> $GITHUB_ENV shell: bash - name: Upload Artifact From 01c4e8f2fee29a1ddf0653ee557cda883c4a5bbe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Pierzcha=C5=82a?= Date: Sat, 17 May 2025 14:58:24 +0200 Subject: [PATCH 07/41] syntax --- action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.yml b/action.yml index 75b27e2..4150c97 100644 --- a/action.yml +++ b/action.yml @@ -105,7 +105,7 @@ runs: - name: Set Artifact Traits run: | - if ${{ inputs.re-sign == 'true' && github.event_name == 'pull_request' }} + if [ "${{ inputs.re-sign }}" == "true" ] && [ "${{ github.event_name }}" == "pull_request" ]; then echo "ARTIFACT_TRAITS=${{ inputs.destination }},${{ inputs.configuration }},${{ github.event.pull_request.number}}" >> $GITHUB_ENV else echo "ARTIFACT_TRAITS=${{ inputs.destination }},${{ inputs.configuration }}" >> $GITHUB_ENV From 6ec901cef0a15c34150b719e92d49dacc69d9ec9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Pierzcha=C5=82a?= Date: Sat, 17 May 2025 15:21:52 +0200 Subject: [PATCH 08/41] escape --- action.yml | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/action.yml b/action.yml index 4150c97..a272d6c 100644 --- a/action.yml +++ b/action.yml @@ -98,7 +98,8 @@ runs: - name: Native Fingerprint id: fingerprint run: | - FINGERPRINT=$(npx rnef fingerprint -p ios --verbose | grep -oE '[a-f0-9]{40}') + FINGERPRINT_OUTPUT=$(npx rnef fingerprint -p ios --verbose) + FINGERPRINT=$(echo "$FINGERPRINT_OUTPUT" | grep -oE '[a-f0-9]{40}') echo "FINGERPRINT=$FINGERPRINT" >> $GITHUB_ENV shell: bash working-directory: ${{ inputs.working-directory }} @@ -106,14 +107,21 @@ runs: - name: Set Artifact Traits run: | if [ "${{ inputs.re-sign }}" == "true" ] && [ "${{ github.event_name }}" == "pull_request" ]; then - echo "ARTIFACT_TRAITS=${{ inputs.destination }},${{ inputs.configuration }},${{ github.event.pull_request.number}}" >> $GITHUB_ENV + ARTIFACT_TRAITS="${{ inputs.destination }},${{ inputs.configuration }},${{ github.event.pull_request.number}}" else - echo "ARTIFACT_TRAITS=${{ inputs.destination }},${{ inputs.configuration }}" >> $GITHUB_ENV + ARTIFACT_TRAITS="${{ inputs.destination }},${{ inputs.configuration }}" fi + echo "ARTIFACT_TRAITS=$ARTIFACT_TRAITS" >> $GITHUB_ENV # Transform commas to hyphens ARTIFACT_TRAITS_HYPHENATED=$(echo "$ARTIFACT_TRAITS" | tr ',' '-') ARTIFACT_TRAITS_HYPHENATED_FINGERPRINT=$ARTIFACT_TRAITS_HYPHENATED-$FINGERPRINT - OUTPUT=$(npx rnef remote-cache list -p ios --traits "$ARTIFACT_TRAITS" --json) + OUTPUT=$(npx rnef remote-cache list -p ios --traits "${ARTIFACT_TRAITS}" --json) + echo "$OUTPUT" + # Revert undefined change when https://github.com/callstack/rnef/pull/338 is merged + if [ -z "$OUTPUT" ] || [ "$OUTPUT" = "undefined" ]; then + echo "No artifact found" + exit 1 + fi echo "ARTIFACT_URL=$(echo "$OUTPUT" | jq -r '.url')" >> $GITHUB_ENV echo "ARTIFACT_ID=$(echo "$OUTPUT" | jq -r '.id')" >> $GITHUB_ENV echo "ARTIFACT_NAME=rnef-ios-$ARTIFACT_TRAITS_HYPHENATED_FINGERPRINT" >> $GITHUB_ENV @@ -201,7 +209,7 @@ runs: - name: Download and Unpack IPA if: ${{ env.ARTIFACT_URL && inputs.destination == 'device' && inputs.re-sign == 'true' && github.event_name == 'pull_request' }} run: | - IPA_PATH=$(npx rnef remote-cache download -p ios --traits "$ARTIFACT_TRAITS" --json) + IPA_PATH=$(npx rnef remote-cache download -p ios --traits "${ARTIFACT_TRAITS}" --json) echo "ARTIFACT_PATH=$IPA_PATH" >> $GITHUB_ENV shell: bash @@ -217,7 +225,7 @@ runs: # Find artifact URL again before uploading, as other concurrent workflows could upload the same artifact - name: Find artifact URL again before uploading run: | - OUTPUT=$(npx rnef remote-cache list -p ios --traits "$ARTIFACT_TRAITS" --json) + OUTPUT=$(npx rnef remote-cache list -p ios --traits "${ARTIFACT_TRAITS}" --json) echo "ARTIFACT_URL=$(echo "$OUTPUT" | jq -r '.url')" >> $GITHUB_ENV echo "ARTIFACT_ID=$(echo "$OUTPUT" | jq -r '.id')" >> $GITHUB_ENV shell: bash @@ -234,7 +242,7 @@ runs: - name: Delete Old Re-Signed Artifacts if: ${{ env.ARTIFACT_URL && inputs.destination == 'device' && inputs.re-sign == 'true' && github.event_name == 'pull_request' }} run: | - npx rnef remote-cache delete -p ios --traits $ARTIFACT_TRAITS --json + npx rnef remote-cache delete -p ios --traits "${ARTIFACT_TRAITS}" --json shell: bash - name: Clean Up Code Signing (device builds only) From 944b817dece465f724da194bf72d1c51734cdb5e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Pierzcha=C5=82a?= Date: Sat, 17 May 2025 18:54:12 +0200 Subject: [PATCH 09/41] set token --- action.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/action.yml b/action.yml index a272d6c..11a8316 100644 --- a/action.yml +++ b/action.yml @@ -99,11 +99,18 @@ runs: id: fingerprint run: | FINGERPRINT_OUTPUT=$(npx rnef fingerprint -p ios --verbose) + echo $FINGERPRINT_OUTPUT FINGERPRINT=$(echo "$FINGERPRINT_OUTPUT" | grep -oE '[a-f0-9]{40}') echo "FINGERPRINT=$FINGERPRINT" >> $GITHUB_ENV shell: bash working-directory: ${{ inputs.working-directory }} + - name: Populate GitHub Token in Cache + run: | + mkdir -p .rnef/cache + echo "{\"githubToken\": \"${{ inputs.github-token }}\"}" > .rnef/cache/project.json + shell: bash + - name: Set Artifact Traits run: | if [ "${{ inputs.re-sign }}" == "true" ] && [ "${{ github.event_name }}" == "pull_request" ]; then @@ -256,6 +263,11 @@ runs: rm "$PROFILE_PATH" shell: bash + - name: Cleanup Cache + run: | + rm -rf .rnef/cache/project.json + shell: bash + - name: Post Build if: ${{ github.event_name == 'pull_request' && inputs.comment-bot == 'true' }} uses: callstackincubator/ios/.github/actions/rnef-post-build@feat/remote-cache-command From 24b1393abba7291186294f5953526910e21854b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Pierzcha=C5=82a?= Date: Sat, 17 May 2025 18:55:55 +0200 Subject: [PATCH 10/41] else --- action.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/action.yml b/action.yml index 11a8316..1e18cde 100644 --- a/action.yml +++ b/action.yml @@ -127,11 +127,11 @@ runs: # Revert undefined change when https://github.com/callstack/rnef/pull/338 is merged if [ -z "$OUTPUT" ] || [ "$OUTPUT" = "undefined" ]; then echo "No artifact found" - exit 1 + else + echo "ARTIFACT_URL=$(echo "$OUTPUT" | jq -r '.url')" >> $GITHUB_ENV + echo "ARTIFACT_ID=$(echo "$OUTPUT" | jq -r '.id')" >> $GITHUB_ENV + echo "ARTIFACT_NAME=rnef-ios-$ARTIFACT_TRAITS_HYPHENATED_FINGERPRINT" >> $GITHUB_ENV fi - echo "ARTIFACT_URL=$(echo "$OUTPUT" | jq -r '.url')" >> $GITHUB_ENV - echo "ARTIFACT_ID=$(echo "$OUTPUT" | jq -r '.id')" >> $GITHUB_ENV - echo "ARTIFACT_NAME=rnef-ios-$ARTIFACT_TRAITS_HYPHENATED_FINGERPRINT" >> $GITHUB_ENV shell: bash - name: Set Provisioning Profile Path From b1b380627755c2fac1ea947c28e531fa07436c1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Pierzcha=C5=82a?= Date: Sat, 17 May 2025 19:08:24 +0200 Subject: [PATCH 11/41] try this --- action.yml | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/action.yml b/action.yml index 1e18cde..e11b58f 100644 --- a/action.yml +++ b/action.yml @@ -113,21 +113,26 @@ runs: - name: Set Artifact Traits run: | - if [ "${{ inputs.re-sign }}" == "true" ] && [ "${{ github.event_name }}" == "pull_request" ]; then - ARTIFACT_TRAITS="${{ inputs.destination }},${{ inputs.configuration }},${{ github.event.pull_request.number}}" - else - ARTIFACT_TRAITS="${{ inputs.destination }},${{ inputs.configuration }}" + ARTIFACT_TRAITS_PR="${{ inputs.destination }},${{ inputs.configuration }},${{ github.event.pull_request.number}}" + ARTIFACT_TRAITS_REGULAR="${{ inputs.destination }},${{ inputs.configuration }}" + + # Check if PR-related artifact existis + OUTPUT=$(npx rnef remote-cache list -p ios --traits "${ARTIFACT_TRAITS_PR}" --json) + echo "ARTIFACT_TRAITS=$ARTIFACT_TRAITS_PR" >> $GITHUB_ENV + # If PR-related artifact doesn't exist, check if for regular artifact + if [ -z "$OUTPUT" ]; then + OUTPUT=$(npx rnef remote-cache list -p ios --traits "${ARTIFACT_TRAITS_REGULAR}" --json) + echo "ARTIFACT_TRAITS=$ARTIFACT_TRAITS_REGULAR" >> $GITHUB_ENV fi - echo "ARTIFACT_TRAITS=$ARTIFACT_TRAITS" >> $GITHUB_ENV - # Transform commas to hyphens - ARTIFACT_TRAITS_HYPHENATED=$(echo "$ARTIFACT_TRAITS" | tr ',' '-') - ARTIFACT_TRAITS_HYPHENATED_FINGERPRINT=$ARTIFACT_TRAITS_HYPHENATED-$FINGERPRINT - OUTPUT=$(npx rnef remote-cache list -p ios --traits "${ARTIFACT_TRAITS}" --json) echo "$OUTPUT" + # Revert undefined change when https://github.com/callstack/rnef/pull/338 is merged if [ -z "$OUTPUT" ] || [ "$OUTPUT" = "undefined" ]; then echo "No artifact found" else + # Transform commas to hyphens + ARTIFACT_TRAITS_HYPHENATED=$(echo "$ARTIFACT_TRAITS" | tr ',' '-') + ARTIFACT_TRAITS_HYPHENATED_FINGERPRINT=$ARTIFACT_TRAITS_HYPHENATED-$FINGERPRINT echo "ARTIFACT_URL=$(echo "$OUTPUT" | jq -r '.url')" >> $GITHUB_ENV echo "ARTIFACT_ID=$(echo "$OUTPUT" | jq -r '.id')" >> $GITHUB_ENV echo "ARTIFACT_NAME=rnef-ios-$ARTIFACT_TRAITS_HYPHENATED_FINGERPRINT" >> $GITHUB_ENV From fe4d1d05a3fa00b76c211129b510a3cc0bb7a451 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Pierzcha=C5=82a?= Date: Sat, 17 May 2025 19:15:27 +0200 Subject: [PATCH 12/41] else, skip delete for now --- action.yml | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/action.yml b/action.yml index e11b58f..2ede3b8 100644 --- a/action.yml +++ b/action.yml @@ -125,7 +125,7 @@ runs: echo "ARTIFACT_TRAITS=$ARTIFACT_TRAITS_REGULAR" >> $GITHUB_ENV fi echo "$OUTPUT" - + # Revert undefined change when https://github.com/callstack/rnef/pull/338 is merged if [ -z "$OUTPUT" ] || [ "$OUTPUT" = "undefined" ]; then echo "No artifact found" @@ -238,8 +238,12 @@ runs: - name: Find artifact URL again before uploading run: | OUTPUT=$(npx rnef remote-cache list -p ios --traits "${ARTIFACT_TRAITS}" --json) - echo "ARTIFACT_URL=$(echo "$OUTPUT" | jq -r '.url')" >> $GITHUB_ENV - echo "ARTIFACT_ID=$(echo "$OUTPUT" | jq -r '.id')" >> $GITHUB_ENV + if [ -z "$OUTPUT" ]; then + echo "No artifact found" + else + echo "ARTIFACT_URL=$(echo "$OUTPUT" | jq -r '.url')" >> $GITHUB_ENV + echo "ARTIFACT_ID=$(echo "$OUTPUT" | jq -r '.id')" >> $GITHUB_ENV + fi shell: bash - name: Upload Artifact @@ -251,11 +255,11 @@ runs: path: ${{ env.ARTIFACT_PATH }} if-no-files-found: error - - name: Delete Old Re-Signed Artifacts - if: ${{ env.ARTIFACT_URL && inputs.destination == 'device' && inputs.re-sign == 'true' && github.event_name == 'pull_request' }} - run: | - npx rnef remote-cache delete -p ios --traits "${ARTIFACT_TRAITS}" --json - shell: bash + # - name: Delete Old Re-Signed Artifacts + # if: ${{ env.ARTIFACT_URL && inputs.destination == 'device' && inputs.re-sign == 'true' && github.event_name == 'pull_request' }} + # run: | + # npx rnef remote-cache delete -p ios --traits "${ARTIFACT_TRAITS}" --json + # shell: bash - name: Clean Up Code Signing (device builds only) if: ${{ !env.ARTIFACT_URL && inputs.destination == 'device' }} From e7b1fa508be9ab848c29a4989fce4dc01fb8558d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Pierzcha=C5=82a?= Date: Mon, 19 May 2025 11:20:23 +0200 Subject: [PATCH 13/41] fixup --- action.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/action.yml b/action.yml index 2ede3b8..2470cf1 100644 --- a/action.yml +++ b/action.yml @@ -120,7 +120,7 @@ runs: OUTPUT=$(npx rnef remote-cache list -p ios --traits "${ARTIFACT_TRAITS_PR}" --json) echo "ARTIFACT_TRAITS=$ARTIFACT_TRAITS_PR" >> $GITHUB_ENV # If PR-related artifact doesn't exist, check if for regular artifact - if [ -z "$OUTPUT" ]; then + if [ -z "$OUTPUT" ] || [ "$OUTPUT" = "undefined" ]; then OUTPUT=$(npx rnef remote-cache list -p ios --traits "${ARTIFACT_TRAITS_REGULAR}" --json) echo "ARTIFACT_TRAITS=$ARTIFACT_TRAITS_REGULAR" >> $GITHUB_ENV fi @@ -238,7 +238,7 @@ runs: - name: Find artifact URL again before uploading run: | OUTPUT=$(npx rnef remote-cache list -p ios --traits "${ARTIFACT_TRAITS}" --json) - if [ -z "$OUTPUT" ]; then + if [ -z "$OUTPUT" ] || [ "$OUTPUT" = "undefined" ]; then echo "No artifact found" else echo "ARTIFACT_URL=$(echo "$OUTPUT" | jq -r '.url')" >> $GITHUB_ENV From 631e80b712f96d9a4399302e7b88acb179633cef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Pierzcha=C5=82a?= Date: Mon, 19 May 2025 13:11:27 +0200 Subject: [PATCH 14/41] escape --- action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.yml b/action.yml index 2470cf1..bd01970 100644 --- a/action.yml +++ b/action.yml @@ -131,7 +131,7 @@ runs: echo "No artifact found" else # Transform commas to hyphens - ARTIFACT_TRAITS_HYPHENATED=$(echo "$ARTIFACT_TRAITS" | tr ',' '-') + ARTIFACT_TRAITS_HYPHENATED=$(echo "${ARTIFACT_TRAITS}" | tr ',' '-') ARTIFACT_TRAITS_HYPHENATED_FINGERPRINT=$ARTIFACT_TRAITS_HYPHENATED-$FINGERPRINT echo "ARTIFACT_URL=$(echo "$OUTPUT" | jq -r '.url')" >> $GITHUB_ENV echo "ARTIFACT_ID=$(echo "$OUTPUT" | jq -r '.id')" >> $GITHUB_ENV From 6aa8f7e6b5aff5c978d84d86cb8d73c9a6ad78ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Pierzcha=C5=82a?= Date: Mon, 19 May 2025 13:30:45 +0200 Subject: [PATCH 15/41] escaping --- action.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/action.yml b/action.yml index bd01970..1b29773 100644 --- a/action.yml +++ b/action.yml @@ -99,7 +99,7 @@ runs: id: fingerprint run: | FINGERPRINT_OUTPUT=$(npx rnef fingerprint -p ios --verbose) - echo $FINGERPRINT_OUTPUT + echo "$FINGERPRINT_OUTPUT" FINGERPRINT=$(echo "$FINGERPRINT_OUTPUT" | grep -oE '[a-f0-9]{40}') echo "FINGERPRINT=$FINGERPRINT" >> $GITHUB_ENV shell: bash @@ -131,8 +131,8 @@ runs: echo "No artifact found" else # Transform commas to hyphens - ARTIFACT_TRAITS_HYPHENATED=$(echo "${ARTIFACT_TRAITS}" | tr ',' '-') - ARTIFACT_TRAITS_HYPHENATED_FINGERPRINT=$ARTIFACT_TRAITS_HYPHENATED-$FINGERPRINT + ARTIFACT_TRAITS_HYPHENATED=$(echo "$ARTIFACT_TRAITS" | tr ',' '-') + ARTIFACT_TRAITS_HYPHENATED_FINGERPRINT="${ARTIFACT_TRAITS_HYPHENATED}-${FINGERPRINT}" echo "ARTIFACT_URL=$(echo "$OUTPUT" | jq -r '.url')" >> $GITHUB_ENV echo "ARTIFACT_ID=$(echo "$OUTPUT" | jq -r '.id')" >> $GITHUB_ENV echo "ARTIFACT_NAME=rnef-ios-$ARTIFACT_TRAITS_HYPHENATED_FINGERPRINT" >> $GITHUB_ENV From 138785fa4bfa959e6c91a09c32647db723f269a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Pierzcha=C5=82a?= Date: Mon, 19 May 2025 13:38:22 +0200 Subject: [PATCH 16/41] . --- action.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/action.yml b/action.yml index 1b29773..d3389b3 100644 --- a/action.yml +++ b/action.yml @@ -99,7 +99,7 @@ runs: id: fingerprint run: | FINGERPRINT_OUTPUT=$(npx rnef fingerprint -p ios --verbose) - echo "$FINGERPRINT_OUTPUT" + echo "FINGERPRINT_OUTPUT value: $FINGERPRINT_OUTPUT" FINGERPRINT=$(echo "$FINGERPRINT_OUTPUT" | grep -oE '[a-f0-9]{40}') echo "FINGERPRINT=$FINGERPRINT" >> $GITHUB_ENV shell: bash @@ -131,11 +131,15 @@ runs: echo "No artifact found" else # Transform commas to hyphens + echo "ARTIFACT_TRAITS value: $ARTIFACT_TRAITS" ARTIFACT_TRAITS_HYPHENATED=$(echo "$ARTIFACT_TRAITS" | tr ',' '-') + echo "ARTIFACT_TRAITS_HYPHENATED value: $ARTIFACT_TRAITS_HYPHENATED" + echo "FINGERPRINT value: $FINGERPRINT" ARTIFACT_TRAITS_HYPHENATED_FINGERPRINT="${ARTIFACT_TRAITS_HYPHENATED}-${FINGERPRINT}" + echo "ARTIFACT_TRAITS_HYPHENATED_FINGERPRINT value: $ARTIFACT_TRAITS_HYPHENATED_FINGERPRINT" echo "ARTIFACT_URL=$(echo "$OUTPUT" | jq -r '.url')" >> $GITHUB_ENV echo "ARTIFACT_ID=$(echo "$OUTPUT" | jq -r '.id')" >> $GITHUB_ENV - echo "ARTIFACT_NAME=rnef-ios-$ARTIFACT_TRAITS_HYPHENATED_FINGERPRINT" >> $GITHUB_ENV + echo "ARTIFACT_NAME=rnef-ios-${ARTIFACT_TRAITS_HYPHENATED_FINGERPRINT}" >> $GITHUB_ENV fi shell: bash From c5543eeab96f34806a9d34ac748bf394297f30a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Pierzcha=C5=82a?= Date: Mon, 19 May 2025 13:44:11 +0200 Subject: [PATCH 17/41] x --- action.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/action.yml b/action.yml index d3389b3..ef22e3d 100644 --- a/action.yml +++ b/action.yml @@ -118,11 +118,11 @@ runs: # Check if PR-related artifact existis OUTPUT=$(npx rnef remote-cache list -p ios --traits "${ARTIFACT_TRAITS_PR}" --json) - echo "ARTIFACT_TRAITS=$ARTIFACT_TRAITS_PR" >> $GITHUB_ENV + ARTIFACT_TRAITS=$ARTIFACT_TRAITS_PR # If PR-related artifact doesn't exist, check if for regular artifact if [ -z "$OUTPUT" ] || [ "$OUTPUT" = "undefined" ]; then OUTPUT=$(npx rnef remote-cache list -p ios --traits "${ARTIFACT_TRAITS_REGULAR}" --json) - echo "ARTIFACT_TRAITS=$ARTIFACT_TRAITS_REGULAR" >> $GITHUB_ENV + ARTIFACT_TRAITS=$ARTIFACT_TRAITS_REGULAR fi echo "$OUTPUT" @@ -137,6 +137,7 @@ runs: echo "FINGERPRINT value: $FINGERPRINT" ARTIFACT_TRAITS_HYPHENATED_FINGERPRINT="${ARTIFACT_TRAITS_HYPHENATED}-${FINGERPRINT}" echo "ARTIFACT_TRAITS_HYPHENATED_FINGERPRINT value: $ARTIFACT_TRAITS_HYPHENATED_FINGERPRINT" + echo "ARTIFACT_TRAITS=$ARTIFACT_TRAITS" >> $GITHUB_ENV echo "ARTIFACT_URL=$(echo "$OUTPUT" | jq -r '.url')" >> $GITHUB_ENV echo "ARTIFACT_ID=$(echo "$OUTPUT" | jq -r '.id')" >> $GITHUB_ENV echo "ARTIFACT_NAME=rnef-ios-${ARTIFACT_TRAITS_HYPHENATED_FINGERPRINT}" >> $GITHUB_ENV From 05ab5fecf92aea3df0ade4a8bc49f083c8c07272 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Pierzcha=C5=82a?= Date: Mon, 19 May 2025 13:51:40 +0200 Subject: [PATCH 18/41] fixup ipa path --- action.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/action.yml b/action.yml index ef22e3d..7627272 100644 --- a/action.yml +++ b/action.yml @@ -226,7 +226,8 @@ runs: - name: Download and Unpack IPA if: ${{ env.ARTIFACT_URL && inputs.destination == 'device' && inputs.re-sign == 'true' && github.event_name == 'pull_request' }} run: | - IPA_PATH=$(npx rnef remote-cache download -p ios --traits "${ARTIFACT_TRAITS}" --json) + DOWNLOAD_OUTPUT=$(npx rnef remote-cache download -p ios --traits "${ARTIFACT_TRAITS}" --json) + IPA_PATH=$(echo "$DOWNLOAD_OUTPUT" | jq -r '.path') echo "ARTIFACT_PATH=$IPA_PATH" >> $GITHUB_ENV shell: bash From 35ed8e1e7f71bc68dd013a96a256bd793e6e78da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Pierzcha=C5=82a?= Date: Mon, 19 May 2025 16:35:37 +0200 Subject: [PATCH 19/41] use name to avoid extra fingerprint calculating --- action.yml | 38 ++++++++++++++++++++------------------ 1 file changed, 20 insertions(+), 18 deletions(-) diff --git a/action.yml b/action.yml index 7627272..59649ba 100644 --- a/action.yml +++ b/action.yml @@ -99,7 +99,7 @@ runs: id: fingerprint run: | FINGERPRINT_OUTPUT=$(npx rnef fingerprint -p ios --verbose) - echo "FINGERPRINT_OUTPUT value: $FINGERPRINT_OUTPUT" + echo "$FINGERPRINT_OUTPUT" >&2 FINGERPRINT=$(echo "$FINGERPRINT_OUTPUT" | grep -oE '[a-f0-9]{40}') echo "FINGERPRINT=$FINGERPRINT" >> $GITHUB_ENV shell: bash @@ -111,7 +111,7 @@ runs: echo "{\"githubToken\": \"${{ inputs.github-token }}\"}" > .rnef/cache/project.json shell: bash - - name: Set Artifact Traits + - name: Set Artifact Traits, URL and ID, Name (if available) run: | ARTIFACT_TRAITS_PR="${{ inputs.destination }},${{ inputs.configuration }},${{ github.event.pull_request.number}}" ARTIFACT_TRAITS_REGULAR="${{ inputs.destination }},${{ inputs.configuration }}" @@ -120,30 +120,31 @@ runs: OUTPUT=$(npx rnef remote-cache list -p ios --traits "${ARTIFACT_TRAITS_PR}" --json) ARTIFACT_TRAITS=$ARTIFACT_TRAITS_PR # If PR-related artifact doesn't exist, check if for regular artifact - if [ -z "$OUTPUT" ] || [ "$OUTPUT" = "undefined" ]; then + if [ -z "$OUTPUT" ]; then OUTPUT=$(npx rnef remote-cache list -p ios --traits "${ARTIFACT_TRAITS_REGULAR}" --json) ARTIFACT_TRAITS=$ARTIFACT_TRAITS_REGULAR fi + echo "ARTIFACT_TRAITS=$ARTIFACT_TRAITS" >> $GITHUB_ENV echo "$OUTPUT" - # Revert undefined change when https://github.com/callstack/rnef/pull/338 is merged - if [ -z "$OUTPUT" ] || [ "$OUTPUT" = "undefined" ]; then + if [ -z "$OUTPUT" ]; then echo "No artifact found" else - # Transform commas to hyphens - echo "ARTIFACT_TRAITS value: $ARTIFACT_TRAITS" - ARTIFACT_TRAITS_HYPHENATED=$(echo "$ARTIFACT_TRAITS" | tr ',' '-') - echo "ARTIFACT_TRAITS_HYPHENATED value: $ARTIFACT_TRAITS_HYPHENATED" - echo "FINGERPRINT value: $FINGERPRINT" - ARTIFACT_TRAITS_HYPHENATED_FINGERPRINT="${ARTIFACT_TRAITS_HYPHENATED}-${FINGERPRINT}" - echo "ARTIFACT_TRAITS_HYPHENATED_FINGERPRINT value: $ARTIFACT_TRAITS_HYPHENATED_FINGERPRINT" - echo "ARTIFACT_TRAITS=$ARTIFACT_TRAITS" >> $GITHUB_ENV echo "ARTIFACT_URL=$(echo "$OUTPUT" | jq -r '.url')" >> $GITHUB_ENV echo "ARTIFACT_ID=$(echo "$OUTPUT" | jq -r '.id')" >> $GITHUB_ENV - echo "ARTIFACT_NAME=rnef-ios-${ARTIFACT_TRAITS_HYPHENATED_FINGERPRINT}" >> $GITHUB_ENV + echo "ARTIFACT_NAME=$(echo "$OUTPUT" | jq -r '.name')" >> $GITHUB_ENV fi shell: bash + - name: Set Artifact Name (if not set) + if: ${{ !env.ARTIFACT_NAME }} + run: | + # Transform commas to hyphens + ARTIFACT_TRAITS_HYPHENATED=$(echo "$ARTIFACT_TRAITS" | tr ',' '-') + ARTIFACT_TRAITS_HYPHENATED_FINGERPRINT="${ARTIFACT_TRAITS_HYPHENATED}-${FINGERPRINT}" + echo "ARTIFACT_NAME=rnef-ios-${ARTIFACT_TRAITS_HYPHENATED_FINGERPRINT}" >> $GITHUB_ENV + shell: bash + - name: Set Provisioning Profile Path run: | echo "PROFILE_DIR=$HOME/Library/MobileDevice/Provisioning Profiles" >> $GITHUB_ENV @@ -226,7 +227,7 @@ runs: - name: Download and Unpack IPA if: ${{ env.ARTIFACT_URL && inputs.destination == 'device' && inputs.re-sign == 'true' && github.event_name == 'pull_request' }} run: | - DOWNLOAD_OUTPUT=$(npx rnef remote-cache download -p ios --traits "${ARTIFACT_TRAITS}" --json) + DOWNLOAD_OUTPUT=$(npx rnef remote-cache download -p ios --name ${{ env.ARTIFACT_NAME }} --json) IPA_PATH=$(echo "$DOWNLOAD_OUTPUT" | jq -r '.path') echo "ARTIFACT_PATH=$IPA_PATH" >> $GITHUB_ENV shell: bash @@ -243,12 +244,13 @@ runs: # Find artifact URL again before uploading, as other concurrent workflows could upload the same artifact - name: Find artifact URL again before uploading run: | - OUTPUT=$(npx rnef remote-cache list -p ios --traits "${ARTIFACT_TRAITS}" --json) - if [ -z "$OUTPUT" ] || [ "$OUTPUT" = "undefined" ]; then + OUTPUT=$(npx rnef remote-cache list -p ios --name ${{ env.ARTIFACT_NAME }} --json) + if [ -z "$OUTPUT" ]; then echo "No artifact found" else echo "ARTIFACT_URL=$(echo "$OUTPUT" | jq -r '.url')" >> $GITHUB_ENV echo "ARTIFACT_ID=$(echo "$OUTPUT" | jq -r '.id')" >> $GITHUB_ENV + echo "ARTIFACT_NAME=$(echo "$OUTPUT" | jq -r '.name')" >> $GITHUB_ENV fi shell: bash @@ -264,7 +266,7 @@ runs: # - name: Delete Old Re-Signed Artifacts # if: ${{ env.ARTIFACT_URL && inputs.destination == 'device' && inputs.re-sign == 'true' && github.event_name == 'pull_request' }} # run: | - # npx rnef remote-cache delete -p ios --traits "${ARTIFACT_TRAITS}" --json + # npx rnef remote-cache delete -p ios --name ${{ env.ARTIFACT_NAME }} --json # shell: bash - name: Clean Up Code Signing (device builds only) From 42fc4d7818b6b45713e5b6dd6222f30cf6b5de74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Pierzcha=C5=82a?= Date: Mon, 19 May 2025 17:19:36 +0200 Subject: [PATCH 20/41] fix --- action.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/action.yml b/action.yml index 59649ba..f574ffc 100644 --- a/action.yml +++ b/action.yml @@ -227,7 +227,7 @@ runs: - name: Download and Unpack IPA if: ${{ env.ARTIFACT_URL && inputs.destination == 'device' && inputs.re-sign == 'true' && github.event_name == 'pull_request' }} run: | - DOWNLOAD_OUTPUT=$(npx rnef remote-cache download -p ios --name ${{ env.ARTIFACT_NAME }} --json) + DOWNLOAD_OUTPUT=$(npx rnef remote-cache download --name ${{ env.ARTIFACT_NAME }} --json) IPA_PATH=$(echo "$DOWNLOAD_OUTPUT" | jq -r '.path') echo "ARTIFACT_PATH=$IPA_PATH" >> $GITHUB_ENV shell: bash @@ -244,7 +244,7 @@ runs: # Find artifact URL again before uploading, as other concurrent workflows could upload the same artifact - name: Find artifact URL again before uploading run: | - OUTPUT=$(npx rnef remote-cache list -p ios --name ${{ env.ARTIFACT_NAME }} --json) + OUTPUT=$(npx rnef remote-cache list --name ${{ env.ARTIFACT_NAME }} --json) if [ -z "$OUTPUT" ]; then echo "No artifact found" else @@ -266,7 +266,7 @@ runs: # - name: Delete Old Re-Signed Artifacts # if: ${{ env.ARTIFACT_URL && inputs.destination == 'device' && inputs.re-sign == 'true' && github.event_name == 'pull_request' }} # run: | - # npx rnef remote-cache delete -p ios --name ${{ env.ARTIFACT_NAME }} --json + # npx rnef remote-cache delete --name ${{ env.ARTIFACT_NAME }} --json # shell: bash - name: Clean Up Code Signing (device builds only) From 2d93d1c6f4c29d5367124b13e85d5aa6e6408ff3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Pierzcha=C5=82a?= Date: Mon, 19 May 2025 17:44:44 +0200 Subject: [PATCH 21/41] cleanup --- action.yml | 35 ++++++++++++++++++----------------- 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/action.yml b/action.yml index f574ffc..65d5528 100644 --- a/action.yml +++ b/action.yml @@ -111,25 +111,27 @@ runs: echo "{\"githubToken\": \"${{ inputs.github-token }}\"}" > .rnef/cache/project.json shell: bash - - name: Set Artifact Traits, URL and ID, Name (if available) + # We create PR-related artifacts to avoid overwriting the main artifact with new JS bundle + - name: Check if PR-related artifact exists + if: ${{ github.event_name == 'pull_request' && inputs.re-sign == 'true' }} run: | - ARTIFACT_TRAITS_PR="${{ inputs.destination }},${{ inputs.configuration }},${{ github.event.pull_request.number}}" - ARTIFACT_TRAITS_REGULAR="${{ inputs.destination }},${{ inputs.configuration }}" - - # Check if PR-related artifact existis - OUTPUT=$(npx rnef remote-cache list -p ios --traits "${ARTIFACT_TRAITS_PR}" --json) - ARTIFACT_TRAITS=$ARTIFACT_TRAITS_PR - # If PR-related artifact doesn't exist, check if for regular artifact - if [ -z "$OUTPUT" ]; then - OUTPUT=$(npx rnef remote-cache list -p ios --traits "${ARTIFACT_TRAITS_REGULAR}" --json) - ARTIFACT_TRAITS=$ARTIFACT_TRAITS_REGULAR + ARTIFACT_TRAITS="${{ inputs.destination }},${{ inputs.configuration }},${{ github.event.pull_request.number}}" + OUTPUT=$(npx rnef remote-cache list -p ios --traits "${ARTIFACT_TRAITS}" --json) + if [ "$OUTPUT" ]; then + echo "ARTIFACT_TRAITS=$ARTIFACT_TRAITS" >> $GITHUB_ENV + echo "ARTIFACT_URL=$(echo "$OUTPUT" | jq -r '.url')" >> $GITHUB_ENV + echo "ARTIFACT_ID=$(echo "$OUTPUT" | jq -r '.id')" >> $GITHUB_ENV + echo "ARTIFACT_NAME=$(echo "$OUTPUT" | jq -r '.name')" >> $GITHUB_ENV fi - echo "ARTIFACT_TRAITS=$ARTIFACT_TRAITS" >> $GITHUB_ENV - echo "$OUTPUT" + shell: bash - if [ -z "$OUTPUT" ]; then - echo "No artifact found" - else + - name: Check if regular artifact exists + if: ${{ !env.ARTIFACT_TRAITS }} + run: | + ARTIFACT_TRAITS="${{ inputs.destination }},${{ inputs.configuration }}" + OUTPUT=$(npx rnef remote-cache list -p ios --traits "${ARTIFACT_TRAITS}" --json) + if [ "$OUTPUT" ]; then + echo "ARTIFACT_TRAITS=$ARTIFACT_TRAITS" >> $GITHUB_ENV echo "ARTIFACT_URL=$(echo "$OUTPUT" | jq -r '.url')" >> $GITHUB_ENV echo "ARTIFACT_ID=$(echo "$OUTPUT" | jq -r '.id')" >> $GITHUB_ENV echo "ARTIFACT_NAME=$(echo "$OUTPUT" | jq -r '.name')" >> $GITHUB_ENV @@ -250,7 +252,6 @@ runs: else echo "ARTIFACT_URL=$(echo "$OUTPUT" | jq -r '.url')" >> $GITHUB_ENV echo "ARTIFACT_ID=$(echo "$OUTPUT" | jq -r '.id')" >> $GITHUB_ENV - echo "ARTIFACT_NAME=$(echo "$OUTPUT" | jq -r '.name')" >> $GITHUB_ENV fi shell: bash From e20ec3fe9dd17a3348073e94e33d66a0fa499214 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Pierzcha=C5=82a?= Date: Mon, 19 May 2025 19:21:18 +0200 Subject: [PATCH 22/41] delete old --- action.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/action.yml b/action.yml index 65d5528..3d09b8b 100644 --- a/action.yml +++ b/action.yml @@ -264,11 +264,11 @@ runs: path: ${{ env.ARTIFACT_PATH }} if-no-files-found: error - # - name: Delete Old Re-Signed Artifacts - # if: ${{ env.ARTIFACT_URL && inputs.destination == 'device' && inputs.re-sign == 'true' && github.event_name == 'pull_request' }} - # run: | - # npx rnef remote-cache delete --name ${{ env.ARTIFACT_NAME }} --json - # shell: bash + - name: Delete Old Re-Signed Artifacts + if: ${{ env.ARTIFACT_URL && inputs.destination == 'device' && inputs.re-sign == 'true' && github.event_name == 'pull_request' }} + run: | + npx rnef remote-cache delete --name ${{ env.ARTIFACT_NAME }} --all-but-latest --json + shell: bash - name: Clean Up Code Signing (device builds only) if: ${{ !env.ARTIFACT_URL && inputs.destination == 'device' }} From 289a4cf087bf81cbd7d4c016a7765e89251e7854 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Pierzcha=C5=82a?= Date: Fri, 23 May 2025 13:10:18 +0200 Subject: [PATCH 23/41] set traits regardless of output --- action.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/action.yml b/action.yml index 3d09b8b..09f571a 100644 --- a/action.yml +++ b/action.yml @@ -116,9 +116,10 @@ runs: if: ${{ github.event_name == 'pull_request' && inputs.re-sign == 'true' }} run: | ARTIFACT_TRAITS="${{ inputs.destination }},${{ inputs.configuration }},${{ github.event.pull_request.number}}" + echo "ARTIFACT_TRAITS=$ARTIFACT_TRAITS" >> $GITHUB_ENV + OUTPUT=$(npx rnef remote-cache list -p ios --traits "${ARTIFACT_TRAITS}" --json) if [ "$OUTPUT" ]; then - echo "ARTIFACT_TRAITS=$ARTIFACT_TRAITS" >> $GITHUB_ENV echo "ARTIFACT_URL=$(echo "$OUTPUT" | jq -r '.url')" >> $GITHUB_ENV echo "ARTIFACT_ID=$(echo "$OUTPUT" | jq -r '.id')" >> $GITHUB_ENV echo "ARTIFACT_NAME=$(echo "$OUTPUT" | jq -r '.name')" >> $GITHUB_ENV @@ -129,9 +130,10 @@ runs: if: ${{ !env.ARTIFACT_TRAITS }} run: | ARTIFACT_TRAITS="${{ inputs.destination }},${{ inputs.configuration }}" + echo "ARTIFACT_TRAITS=$ARTIFACT_TRAITS" >> $GITHUB_ENV + OUTPUT=$(npx rnef remote-cache list -p ios --traits "${ARTIFACT_TRAITS}" --json) if [ "$OUTPUT" ]; then - echo "ARTIFACT_TRAITS=$ARTIFACT_TRAITS" >> $GITHUB_ENV echo "ARTIFACT_URL=$(echo "$OUTPUT" | jq -r '.url')" >> $GITHUB_ENV echo "ARTIFACT_ID=$(echo "$OUTPUT" | jq -r '.id')" >> $GITHUB_ENV echo "ARTIFACT_NAME=$(echo "$OUTPUT" | jq -r '.name')" >> $GITHUB_ENV @@ -267,7 +269,7 @@ runs: - name: Delete Old Re-Signed Artifacts if: ${{ env.ARTIFACT_URL && inputs.destination == 'device' && inputs.re-sign == 'true' && github.event_name == 'pull_request' }} run: | - npx rnef remote-cache delete --name ${{ env.ARTIFACT_NAME }} --all-but-latest --json + npx rnef remote-cache delete --name ${{ env.ARTIFACT_NAME }} --all-but-latest` --json shell: bash - name: Clean Up Code Signing (device builds only) From 64296262d9cc53aa1e441a2c9a2abb8b3b861b4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Pierzcha=C5=82a?= Date: Fri, 6 Jun 2025 20:44:22 +0200 Subject: [PATCH 24/41] chore: remove deps --- package-lock.json | 1164 --------------------------------------------- package.json | 8 +- 2 files changed, 1 insertion(+), 1171 deletions(-) diff --git a/package-lock.json b/package-lock.json index 9fcce36..41c9a41 100644 --- a/package-lock.json +++ b/package-lock.json @@ -7,1171 +7,7 @@ "": { "name": "action-ios", "version": "1.0.0", - "license": "MIT", - "dependencies": { - "@actions/core": "^1.11.1", - "@actions/github": "^6.0.0", - "@rnef/config": "^0.7.18", - "@rnef/tools": "^0.7.18" - } - }, - "node_modules/@actions/core": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@actions/core/-/core-1.11.1.tgz", - "integrity": "sha512-hXJCSrkwfA46Vd9Z3q4cpEpHB1rL5NG04+/rbqW9d3+CSvtB1tYe8UTpAlixa1vj0m/ULglfEK2UKxMGxCxv5A==", - "license": "MIT", - "dependencies": { - "@actions/exec": "^1.1.1", - "@actions/http-client": "^2.0.1" - } - }, - "node_modules/@actions/exec": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/@actions/exec/-/exec-1.1.1.tgz", - "integrity": "sha512-+sCcHHbVdk93a0XT19ECtO/gIXoxvdsgQLzb2fE2/5sIZmWQuluYyjPQtrtTHdU1YzTZ7bAPN4sITq2xi1679w==", - "license": "MIT", - "dependencies": { - "@actions/io": "^1.0.1" - } - }, - "node_modules/@actions/github": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/@actions/github/-/github-6.0.0.tgz", - "integrity": "sha512-alScpSVnYmjNEXboZjarjukQEzgCRmjMv6Xj47fsdnqGS73bjJNDpiiXmp8jr0UZLdUB6d9jW63IcmddUP+l0g==", - "license": "MIT", - "dependencies": { - "@actions/http-client": "^2.2.0", - "@octokit/core": "^5.0.1", - "@octokit/plugin-paginate-rest": "^9.0.0", - "@octokit/plugin-rest-endpoint-methods": "^10.0.0" - } - }, - "node_modules/@actions/http-client": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-2.2.3.tgz", - "integrity": "sha512-mx8hyJi/hjFvbPokCg4uRd4ZX78t+YyRPtnKWwIl+RzNaVuFpQHfmlGVfsKEJN8LwTCvL+DfVgAM04XaHkm6bA==", - "license": "MIT", - "dependencies": { - "tunnel": "^0.0.6", - "undici": "^5.25.4" - } - }, - "node_modules/@actions/io": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/@actions/io/-/io-1.1.3.tgz", - "integrity": "sha512-wi9JjgKLYS7U/z8PPbco+PvTb/nRWjeoFlJ1Qer83k/3C5PHQi28hiVdeE2kHXmIL99mQFawx8qt/JPjZilJ8Q==", "license": "MIT" - }, - "node_modules/@babel/code-frame": { - "version": "7.26.2", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.26.2.tgz", - "integrity": "sha512-RJlIHRueQgwWitWgF8OdFYGZX328Ax5BCemNGlqHfplnRT9ESi8JkFlvaVYbS+UubVY6dpv87Fs2u5M29iNFVQ==", - "license": "MIT", - "dependencies": { - "@babel/helper-validator-identifier": "^7.25.9", - "js-tokens": "^4.0.0", - "picocolors": "^1.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-validator-identifier": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.25.9.tgz", - "integrity": "sha512-Ed61U6XJc3CVRfkERJWDz4dJwKe7iLmmJsbOGu9wSloNSFttHV0I8g6UAgb7qnK5ly5bGLPd4oXZlxCdANBOWQ==", - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@clack/core": { - "version": "0.4.2", - "resolved": "https://registry.npmjs.org/@clack/core/-/core-0.4.2.tgz", - "integrity": "sha512-NYQfcEy8MWIxrT5Fj8nIVchfRFA26yYKJcvBS7WlUIlw2OmQOY9DhGGXMovyI5J5PpxrCPGkgUi207EBrjpBvg==", - "license": "MIT", - "dependencies": { - "picocolors": "^1.0.0", - "sisteransi": "^1.0.5" - } - }, - "node_modules/@clack/prompts": { - "version": "0.10.1", - "resolved": "https://registry.npmjs.org/@clack/prompts/-/prompts-0.10.1.tgz", - "integrity": "sha512-Q0T02vx8ZM9XSv9/Yde0jTmmBQufZhPJfYAg2XrrrxWWaZgq1rr8nU8Hv710BQ1dhoP8rtY7YUdpGej2Qza/cw==", - "license": "MIT", - "dependencies": { - "@clack/core": "0.4.2", - "picocolors": "^1.0.0", - "sisteransi": "^1.0.5" - } - }, - "node_modules/@expo/fingerprint": { - "version": "0.11.11", - "resolved": "https://registry.npmjs.org/@expo/fingerprint/-/fingerprint-0.11.11.tgz", - "integrity": "sha512-gNyn1KnAOpEa8gSNsYqXMTcq0fSwqU/vit6fP5863vLSKxHm/dNt/gm/uZJxrRZxKq71KUJWF6I7d3z8qIfq5g==", - "license": "MIT", - "dependencies": { - "@expo/spawn-async": "^1.7.2", - "arg": "^5.0.2", - "chalk": "^4.1.2", - "debug": "^4.3.4", - "find-up": "^5.0.0", - "getenv": "^1.0.0", - "minimatch": "^3.0.4", - "p-limit": "^3.1.0", - "resolve-from": "^5.0.0", - "semver": "^7.6.0" - }, - "bin": { - "fingerprint": "bin/cli.js" - } - }, - "node_modules/@expo/spawn-async": { - "version": "1.7.2", - "resolved": "https://registry.npmjs.org/@expo/spawn-async/-/spawn-async-1.7.2.tgz", - "integrity": "sha512-QdWi16+CHB9JYP7gma19OVVg0BFkvU8zNj9GjWorYI8Iv8FUxjOCcYRuAmX4s/h91e4e7BPsskc8cSrZYho9Ew==", - "license": "MIT", - "dependencies": { - "cross-spawn": "^7.0.3" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/@fastify/busboy": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/@fastify/busboy/-/busboy-2.1.1.tgz", - "integrity": "sha512-vBZP4NlzfOlerQTnba4aqZoMhE/a9HY7HRqoOPaETQcSQuWEIyZMHGfVu6w9wGtGK5fED5qRs2DteVCjOH60sA==", - "license": "MIT", - "engines": { - "node": ">=14" - } - }, - "node_modules/@hapi/hoek": { - "version": "9.3.0", - "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-9.3.0.tgz", - "integrity": "sha512-/c6rf4UJlmHlC9b5BaNvzAcFv7HZ2QHaV0D4/HNlBdvFnvQq8RI4kYdhyPCl7Xj+oWvTWQ8ujhqS53LIgAe6KQ==", - "license": "BSD-3-Clause" - }, - "node_modules/@hapi/topo": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/@hapi/topo/-/topo-5.1.0.tgz", - "integrity": "sha512-foQZKJig7Ob0BMAYBfcJk8d77QtOe7Wo4ox7ff1lQYoNNAb6jwcY1ncdoy2e9wQZzvNy7ODZCYJkK8kzmcAnAg==", - "license": "BSD-3-Clause", - "dependencies": { - "@hapi/hoek": "^9.0.0" - } - }, - "node_modules/@isaacs/fs-minipass": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/@isaacs/fs-minipass/-/fs-minipass-4.0.1.tgz", - "integrity": "sha512-wgm9Ehl2jpeqP3zw/7mo3kRHFp5MEDhqAdwy1fTGkHAwnkGOVsgpvQhL8B5n1qlb01jV3n/bI0ZfZp5lWA1k4w==", - "license": "ISC", - "dependencies": { - "minipass": "^7.0.4" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@nodelib/fs.scandir": { - "version": "2.1.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", - "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", - "license": "MIT", - "dependencies": { - "@nodelib/fs.stat": "2.0.5", - "run-parallel": "^1.1.9" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/@nodelib/fs.stat": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", - "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", - "license": "MIT", - "engines": { - "node": ">= 8" - } - }, - "node_modules/@nodelib/fs.walk": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", - "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", - "license": "MIT", - "dependencies": { - "@nodelib/fs.scandir": "2.1.5", - "fastq": "^1.6.0" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/@octokit/auth-token": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-4.0.0.tgz", - "integrity": "sha512-tY/msAuJo6ARbK6SPIxZrPBms3xPbfwBrulZe0Wtr/DIY9lje2HeV1uoebShn6mx7SjCHif6EjMvoREj+gZ+SA==", - "license": "MIT", - "engines": { - "node": ">= 18" - } - }, - "node_modules/@octokit/core": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/@octokit/core/-/core-5.2.0.tgz", - "integrity": "sha512-1LFfa/qnMQvEOAdzlQymH0ulepxbxnCYAKJZfMci/5XJyIHWgEYnDmgnKakbTh7CH2tFQ5O60oYDvns4i9RAIg==", - "license": "MIT", - "dependencies": { - "@octokit/auth-token": "^4.0.0", - "@octokit/graphql": "^7.1.0", - "@octokit/request": "^8.3.1", - "@octokit/request-error": "^5.1.0", - "@octokit/types": "^13.0.0", - "before-after-hook": "^2.2.0", - "universal-user-agent": "^6.0.0" - }, - "engines": { - "node": ">= 18" - } - }, - "node_modules/@octokit/endpoint": { - "version": "9.0.6", - "resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-9.0.6.tgz", - "integrity": "sha512-H1fNTMA57HbkFESSt3Y9+FBICv+0jFceJFPWDePYlR/iMGrwM5ph+Dd4XRQs+8X+PUFURLQgX9ChPfhJ/1uNQw==", - "license": "MIT", - "dependencies": { - "@octokit/types": "^13.1.0", - "universal-user-agent": "^6.0.0" - }, - "engines": { - "node": ">= 18" - } - }, - "node_modules/@octokit/graphql": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-7.1.1.tgz", - "integrity": "sha512-3mkDltSfcDUoa176nlGoA32RGjeWjl3K7F/BwHwRMJUW/IteSa4bnSV8p2ThNkcIcZU2umkZWxwETSSCJf2Q7g==", - "license": "MIT", - "dependencies": { - "@octokit/request": "^8.4.1", - "@octokit/types": "^13.0.0", - "universal-user-agent": "^6.0.0" - }, - "engines": { - "node": ">= 18" - } - }, - "node_modules/@octokit/openapi-types": { - "version": "23.0.1", - "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-23.0.1.tgz", - "integrity": "sha512-izFjMJ1sir0jn0ldEKhZ7xegCTj/ObmEDlEfpFrx4k/JyZSMRHbO3/rBwgE7f3m2DHt+RrNGIVw4wSmwnm3t/g==", - "license": "MIT" - }, - "node_modules/@octokit/plugin-paginate-rest": { - "version": "9.2.2", - "resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-9.2.2.tgz", - "integrity": "sha512-u3KYkGF7GcZnSD/3UP0S7K5XUFT2FkOQdcfXZGZQPGv3lm4F2Xbf71lvjldr8c1H3nNbF+33cLEkWYbokGWqiQ==", - "license": "MIT", - "dependencies": { - "@octokit/types": "^12.6.0" - }, - "engines": { - "node": ">= 18" - }, - "peerDependencies": { - "@octokit/core": "5" - } - }, - "node_modules/@octokit/plugin-paginate-rest/node_modules/@octokit/openapi-types": { - "version": "20.0.0", - "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-20.0.0.tgz", - "integrity": "sha512-EtqRBEjp1dL/15V7WiX5LJMIxxkdiGJnabzYx5Apx4FkQIFgAfKumXeYAqqJCj1s+BMX4cPFIFC4OLCR6stlnA==", - "license": "MIT" - }, - "node_modules/@octokit/plugin-paginate-rest/node_modules/@octokit/types": { - "version": "12.6.0", - "resolved": "https://registry.npmjs.org/@octokit/types/-/types-12.6.0.tgz", - "integrity": "sha512-1rhSOfRa6H9w4YwK0yrf5faDaDTb+yLyBUKOCV4xtCDB5VmIPqd/v9yr9o6SAzOAlRxMiRiCic6JVM1/kunVkw==", - "license": "MIT", - "dependencies": { - "@octokit/openapi-types": "^20.0.0" - } - }, - "node_modules/@octokit/plugin-rest-endpoint-methods": { - "version": "10.4.1", - "resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-10.4.1.tgz", - "integrity": "sha512-xV1b+ceKV9KytQe3zCVqjg+8GTGfDYwaT1ATU5isiUyVtlVAO3HNdzpS4sr4GBx4hxQ46s7ITtZrAsxG22+rVg==", - "license": "MIT", - "dependencies": { - "@octokit/types": "^12.6.0" - }, - "engines": { - "node": ">= 18" - }, - "peerDependencies": { - "@octokit/core": "5" - } - }, - "node_modules/@octokit/plugin-rest-endpoint-methods/node_modules/@octokit/openapi-types": { - "version": "20.0.0", - "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-20.0.0.tgz", - "integrity": "sha512-EtqRBEjp1dL/15V7WiX5LJMIxxkdiGJnabzYx5Apx4FkQIFgAfKumXeYAqqJCj1s+BMX4cPFIFC4OLCR6stlnA==", - "license": "MIT" - }, - "node_modules/@octokit/plugin-rest-endpoint-methods/node_modules/@octokit/types": { - "version": "12.6.0", - "resolved": "https://registry.npmjs.org/@octokit/types/-/types-12.6.0.tgz", - "integrity": "sha512-1rhSOfRa6H9w4YwK0yrf5faDaDTb+yLyBUKOCV4xtCDB5VmIPqd/v9yr9o6SAzOAlRxMiRiCic6JVM1/kunVkw==", - "license": "MIT", - "dependencies": { - "@octokit/openapi-types": "^20.0.0" - } - }, - "node_modules/@octokit/request": { - "version": "8.4.1", - "resolved": "https://registry.npmjs.org/@octokit/request/-/request-8.4.1.tgz", - "integrity": "sha512-qnB2+SY3hkCmBxZsR/MPCybNmbJe4KAlfWErXq+rBKkQJlbjdJeS85VI9r8UqeLYLvnAenU8Q1okM/0MBsAGXw==", - "license": "MIT", - "dependencies": { - "@octokit/endpoint": "^9.0.6", - "@octokit/request-error": "^5.1.1", - "@octokit/types": "^13.1.0", - "universal-user-agent": "^6.0.0" - }, - "engines": { - "node": ">= 18" - } - }, - "node_modules/@octokit/request-error": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-5.1.1.tgz", - "integrity": "sha512-v9iyEQJH6ZntoENr9/yXxjuezh4My67CBSu9r6Ve/05Iu5gNgnisNWOsoJHTP6k0Rr0+HQIpnH+kyammu90q/g==", - "license": "MIT", - "dependencies": { - "@octokit/types": "^13.1.0", - "deprecation": "^2.0.0", - "once": "^1.4.0" - }, - "engines": { - "node": ">= 18" - } - }, - "node_modules/@octokit/types": { - "version": "13.8.0", - "resolved": "https://registry.npmjs.org/@octokit/types/-/types-13.8.0.tgz", - "integrity": "sha512-x7DjTIbEpEWXK99DMd01QfWy0hd5h4EN+Q7shkdKds3otGQP+oWE/y0A76i1OvH9fygo4ddvNf7ZvF0t78P98A==", - "license": "MIT", - "dependencies": { - "@octokit/openapi-types": "^23.0.1" - } - }, - "node_modules/@rnef/config": { - "version": "0.7.18", - "resolved": "https://registry.npmjs.org/@rnef/config/-/config-0.7.18.tgz", - "integrity": "sha512-en4if12nENnOd4wzANvK2m7U/l7cIo6uF6KaCctDorseqf3xv4Cz8IdYHO7XUY26o7lu0qDPZcZJiU6ESqXZAg==", - "dependencies": { - "@babel/code-frame": "^7.26.2", - "@rnef/provider-github": "^0.7.18", - "@rnef/tools": "^0.7.18", - "joi": "^17.13.3", - "tslib": "^2.3.0" - } - }, - "node_modules/@rnef/provider-github": { - "version": "0.7.18", - "resolved": "https://registry.npmjs.org/@rnef/provider-github/-/provider-github-0.7.18.tgz", - "integrity": "sha512-voc5xI+n8BeiPsB1o6TVfimExvvP/A/6GbVwiXb15/tiOgXNf2gk2u2JimisGW7w2JHPvSvCherOw+nmcJo88A==", - "dependencies": { - "@rnef/tools": "^0.7.18", - "ts-regex-builder": "^1.8.2", - "tslib": "^2.3.0" - } - }, - "node_modules/@rnef/tools": { - "version": "0.7.18", - "resolved": "https://registry.npmjs.org/@rnef/tools/-/tools-0.7.18.tgz", - "integrity": "sha512-iVTGBImkjJXIY/Ap6+0s9xtuiBYOAuPW7BrJRJlkTl73VhEg1tIn8dLjVrvKMNZzQe9k65KzGCfdr0aZIggyUQ==", - "dependencies": { - "@clack/prompts": "^0.10.0", - "@expo/fingerprint": "^0.11.6", - "@types/adm-zip": "^0.5.7", - "adm-zip": "^0.5.16", - "appdirsjs": "^1.2.7", - "fast-glob": "^3.3.2", - "is-unicode-supported": "^2.1.0", - "nano-spawn": "^0.2.0", - "picocolors": "^1.1.1", - "string-argv": "^0.3.2", - "tar": "^7.4.3", - "tslib": "^2.3.0" - } - }, - "node_modules/@sideway/address": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/@sideway/address/-/address-4.1.5.tgz", - "integrity": "sha512-IqO/DUQHUkPeixNQ8n0JA6102hT9CmaljNTPmQ1u8MEhBo/R4Q8eKLN/vGZxuebwOroDB4cbpjheD4+/sKFK4Q==", - "license": "BSD-3-Clause", - "dependencies": { - "@hapi/hoek": "^9.0.0" - } - }, - "node_modules/@sideway/formula": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@sideway/formula/-/formula-3.0.1.tgz", - "integrity": "sha512-/poHZJJVjx3L+zVD6g9KgHfYnb443oi7wLu/XKojDviHy6HOEOA6z1Trk5aR1dGcmPenJEgb2sK2I80LeS3MIg==", - "license": "BSD-3-Clause" - }, - "node_modules/@sideway/pinpoint": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@sideway/pinpoint/-/pinpoint-2.0.0.tgz", - "integrity": "sha512-RNiOoTPkptFtSVzQevY/yWtZwf/RxyVnPy/OcA9HBM3MlGDnBEYL5B41H0MTn0Uec8Hi+2qUtTfG2WWZBmMejQ==", - "license": "BSD-3-Clause" - }, - "node_modules/@types/adm-zip": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/@types/adm-zip/-/adm-zip-0.5.7.tgz", - "integrity": "sha512-DNEs/QvmyRLurdQPChqq0Md4zGvPwHerAJYWk9l2jCbD1VPpnzRJorOdiq4zsw09NFbYnhfsoEhWtxIzXpn2yw==", - "license": "MIT", - "dependencies": { - "@types/node": "*" - } - }, - "node_modules/@types/node": { - "version": "22.15.29", - "resolved": "https://registry.npmjs.org/@types/node/-/node-22.15.29.tgz", - "integrity": "sha512-LNdjOkUDlU1RZb8e1kOIUpN1qQUlzGkEtbVNo53vbrwDg5om6oduhm4SiUaPW5ASTXhAiP0jInWG8Qx9fVlOeQ==", - "license": "MIT", - "dependencies": { - "undici-types": "~6.21.0" - } - }, - "node_modules/adm-zip": { - "version": "0.5.16", - "resolved": "https://registry.npmjs.org/adm-zip/-/adm-zip-0.5.16.tgz", - "integrity": "sha512-TGw5yVi4saajsSEgz25grObGHEUaDrniwvA2qwSC060KfqGPdglhvPMA2lPIoxs3PQIItj2iag35fONcQqgUaQ==", - "license": "MIT", - "engines": { - "node": ">=12.0" - } - }, - "node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "license": "MIT", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/appdirsjs": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/appdirsjs/-/appdirsjs-1.2.7.tgz", - "integrity": "sha512-Quji6+8kLBC3NnBeo14nPDq0+2jUs5s3/xEye+udFHumHhRk4M7aAMXp/PBJqkKYGuuyR9M/6Dq7d2AViiGmhw==", - "license": "MIT" - }, - "node_modules/arg": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/arg/-/arg-5.0.2.tgz", - "integrity": "sha512-PYjyFOLKQ9y57JvQ6QLo8dAgNqswh8M1RMJYdQduT6xbWSgK36P/Z/v+p888pM69jMMfS8Xd8F6I1kQ/I9HUGg==", - "license": "MIT" - }, - "node_modules/balanced-match": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", - "license": "MIT" - }, - "node_modules/before-after-hook": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/before-after-hook/-/before-after-hook-2.2.3.tgz", - "integrity": "sha512-NzUnlZexiaH/46WDhANlyR2bXRopNg4F/zuSA3OpZnllCUgRaOF2znDioDWrmbNVsuZk6l9pMquQB38cfBZwkQ==", - "license": "Apache-2.0" - }, - "node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/braces": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", - "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", - "license": "MIT", - "dependencies": { - "fill-range": "^7.1.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/chownr": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/chownr/-/chownr-3.0.0.tgz", - "integrity": "sha512-+IxzY9BZOQd/XuYPRmrvEVjF/nqj5kgT4kEq7VofrDoM1MxoRjEWkrCC3EtLi59TVawxTAn+orJwFQcrqEN1+g==", - "license": "BlueOak-1.0.0", - "engines": { - "node": ">=18" - } - }, - "node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "license": "MIT", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "license": "MIT" - }, - "node_modules/concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", - "license": "MIT" - }, - "node_modules/cross-spawn": { - "version": "7.0.6", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", - "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", - "license": "MIT", - "dependencies": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/debug": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.1.tgz", - "integrity": "sha512-KcKCqiftBJcZr++7ykoDIEwSa3XWowTfNPo92BYxjXiyYEVrUQh2aLyhxBCwww+heortUFxEJYcRzosstTEBYQ==", - "license": "MIT", - "dependencies": { - "ms": "^2.1.3" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/deprecation": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/deprecation/-/deprecation-2.3.1.tgz", - "integrity": "sha512-xmHIy4F3scKVwMsQ4WnVaS8bHOx0DmVwRywosKhaILI0ywMDWPtBSku2HNxRvF7jtwDRsoEwYQSfbxj8b7RlJQ==", - "license": "ISC" - }, - "node_modules/fast-glob": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.3.tgz", - "integrity": "sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==", - "license": "MIT", - "dependencies": { - "@nodelib/fs.stat": "^2.0.2", - "@nodelib/fs.walk": "^1.2.3", - "glob-parent": "^5.1.2", - "merge2": "^1.3.0", - "micromatch": "^4.0.8" - }, - "engines": { - "node": ">=8.6.0" - } - }, - "node_modules/fastq": { - "version": "1.19.1", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.19.1.tgz", - "integrity": "sha512-GwLTyxkCXjXbxqIhTsMI2Nui8huMPtnxg7krajPJAjnEG/iiOS7i+zCtWGZR9G0NBKbXKh6X9m9UIsYX/N6vvQ==", - "license": "ISC", - "dependencies": { - "reusify": "^1.0.4" - } - }, - "node_modules/fill-range": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", - "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", - "license": "MIT", - "dependencies": { - "to-regex-range": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/find-up": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", - "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", - "license": "MIT", - "dependencies": { - "locate-path": "^6.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/getenv": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/getenv/-/getenv-1.0.0.tgz", - "integrity": "sha512-7yetJWqbS9sbn0vIfliPsFgoXMKn/YMF+Wuiog97x+urnSRRRZ7xB+uVkwGKzRgq9CDFfMQnE9ruL5DHv9c6Xg==", - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "license": "ISC", - "dependencies": { - "is-glob": "^4.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-glob": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", - "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", - "license": "MIT", - "dependencies": { - "is-extglob": "^2.1.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-number": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "license": "MIT", - "engines": { - "node": ">=0.12.0" - } - }, - "node_modules/is-unicode-supported": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-2.1.0.tgz", - "integrity": "sha512-mE00Gnza5EEB3Ds0HfMyllZzbBrmLOX3vfWoj9A9PEnTfratQ/BcaJOuMhnkhjXvb2+FkY3VuHqtAGpTPmglFQ==", - "license": "MIT", - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", - "license": "ISC" - }, - "node_modules/joi": { - "version": "17.13.3", - "resolved": "https://registry.npmjs.org/joi/-/joi-17.13.3.tgz", - "integrity": "sha512-otDA4ldcIx+ZXsKHWmp0YizCweVRZG96J10b0FevjfuncLO1oX59THoAmHkNubYJ+9gWsYsp5k8v4ib6oDv1fA==", - "license": "BSD-3-Clause", - "dependencies": { - "@hapi/hoek": "^9.3.0", - "@hapi/topo": "^5.1.0", - "@sideway/address": "^4.1.5", - "@sideway/formula": "^3.0.1", - "@sideway/pinpoint": "^2.0.0" - } - }, - "node_modules/js-tokens": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", - "license": "MIT" - }, - "node_modules/locate-path": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", - "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", - "license": "MIT", - "dependencies": { - "p-locate": "^5.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/merge2": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", - "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", - "license": "MIT", - "engines": { - "node": ">= 8" - } - }, - "node_modules/micromatch": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", - "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", - "license": "MIT", - "dependencies": { - "braces": "^3.0.3", - "picomatch": "^2.3.1" - }, - "engines": { - "node": ">=8.6" - } - }, - "node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "license": "ISC", - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/minipass": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", - "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", - "license": "ISC", - "engines": { - "node": ">=16 || 14 >=14.17" - } - }, - "node_modules/minizlib": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-3.0.2.tgz", - "integrity": "sha512-oG62iEk+CYt5Xj2YqI5Xi9xWUeZhDI8jjQmC5oThVH5JGCTgIjr7ciJDzC7MBzYd//WvR1OTmP5Q38Q8ShQtVA==", - "license": "MIT", - "dependencies": { - "minipass": "^7.1.2" - }, - "engines": { - "node": ">= 18" - } - }, - "node_modules/mkdirp": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-3.0.1.tgz", - "integrity": "sha512-+NsyUUAZDmo6YVHzL/stxSu3t9YS1iljliy3BSDrXJ/dkn1KYdmtZODGGjLcc9XLgVVpH4KshHB8XmZgMhaBXg==", - "license": "MIT", - "bin": { - "mkdirp": "dist/cjs/src/bin.js" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "license": "MIT" - }, - "node_modules/nano-spawn": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/nano-spawn/-/nano-spawn-0.2.1.tgz", - "integrity": "sha512-/pULofvsF8mOVcl/nUeVXL/GYOEvc7eJWSIxa+K4OYUolvXa5zwSgevsn4eoHs1xvh/BO3vx/PZiD9+Ow2ZVuw==", - "license": "MIT", - "engines": { - "node": ">=18.19" - }, - "funding": { - "url": "https://github.com/sindresorhus/nano-spawn?sponsor=1" - } - }, - "node_modules/once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", - "license": "ISC", - "dependencies": { - "wrappy": "1" - } - }, - "node_modules/p-limit": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", - "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", - "license": "MIT", - "dependencies": { - "yocto-queue": "^0.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/p-locate": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", - "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", - "license": "MIT", - "dependencies": { - "p-limit": "^3.0.2" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/path-key": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/picocolors": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", - "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", - "license": "ISC" - }, - "node_modules/picomatch": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", - "license": "MIT", - "engines": { - "node": ">=8.6" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, - "node_modules/queue-microtask": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", - "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT" - }, - "node_modules/resolve-from": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", - "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/reusify": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.1.0.tgz", - "integrity": "sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw==", - "license": "MIT", - "engines": { - "iojs": ">=1.0.0", - "node": ">=0.10.0" - } - }, - "node_modules/run-parallel": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", - "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT", - "dependencies": { - "queue-microtask": "^1.2.2" - } - }, - "node_modules/semver": { - "version": "7.7.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz", - "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==", - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/shebang-command": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", - "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", - "license": "MIT", - "dependencies": { - "shebang-regex": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/shebang-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/sisteransi": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz", - "integrity": "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==", - "license": "MIT" - }, - "node_modules/string-argv": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/string-argv/-/string-argv-0.3.2.tgz", - "integrity": "sha512-aqD2Q0144Z+/RqG52NeHEkZauTAUWJO8c6yTftGJKO3Tja5tUgIfmIl6kExvhtxSDP7fXB6DvzkfMpCd/F3G+Q==", - "license": "MIT", - "engines": { - "node": ">=0.6.19" - } - }, - "node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/tar": { - "version": "7.4.3", - "resolved": "https://registry.npmjs.org/tar/-/tar-7.4.3.tgz", - "integrity": "sha512-5S7Va8hKfV7W5U6g3aYxXmlPoZVAwUMy9AOKyF2fVuZa2UD3qZjg578OrLRt8PcNN1PleVaL/5/yYATNL0ICUw==", - "license": "ISC", - "dependencies": { - "@isaacs/fs-minipass": "^4.0.0", - "chownr": "^3.0.0", - "minipass": "^7.1.2", - "minizlib": "^3.0.1", - "mkdirp": "^3.0.1", - "yallist": "^5.0.0" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/to-regex-range": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "license": "MIT", - "dependencies": { - "is-number": "^7.0.0" - }, - "engines": { - "node": ">=8.0" - } - }, - "node_modules/ts-regex-builder": { - "version": "1.8.2", - "resolved": "https://registry.npmjs.org/ts-regex-builder/-/ts-regex-builder-1.8.2.tgz", - "integrity": "sha512-Y8HovHFheDKm/jgLIWSO8o81xA/I9O5AGc3/vNG1sVSskatOifr3SQzAsatBXGLjL3nYhQif1MpwQRS5GF8ADg==", - "license": "MIT", - "engines": { - "node": ">= 18.0.0" - } - }, - "node_modules/tslib": { - "version": "2.8.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", - "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", - "license": "0BSD" - }, - "node_modules/tunnel": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz", - "integrity": "sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==", - "license": "MIT", - "engines": { - "node": ">=0.6.11 <=0.7.0 || >=0.7.3" - } - }, - "node_modules/undici": { - "version": "5.28.5", - "resolved": "https://registry.npmjs.org/undici/-/undici-5.28.5.tgz", - "integrity": "sha512-zICwjrDrcrUE0pyyJc1I2QzBkLM8FINsgOrt6WjA+BgajVq9Nxu2PbFFXUrAggLfDXlZGZBVZYw7WNV5KiBiBA==", - "license": "MIT", - "dependencies": { - "@fastify/busboy": "^2.0.0" - }, - "engines": { - "node": ">=14.0" - } - }, - "node_modules/undici-types": { - "version": "6.21.0", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz", - "integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==", - "license": "MIT" - }, - "node_modules/universal-user-agent": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-6.0.1.tgz", - "integrity": "sha512-yCzhz6FN2wU1NiiQRogkTQszlQSlpWaw8SvVegAc+bDxbzHgh1vX8uIe8OYyMH6DwH+sdTJsgMl36+mSMdRJIQ==", - "license": "ISC" - }, - "node_modules/which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "license": "ISC", - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "node-which": "bin/node-which" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", - "license": "ISC" - }, - "node_modules/yallist": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-5.0.0.tgz", - "integrity": "sha512-YgvUTfwqyc7UXVMrB+SImsVYSmTS8X/tSrtdNZMImM+n7+QTriRXyXim0mBrTXNeqzVF0KWGgHPeiyViFFrNDw==", - "license": "BlueOak-1.0.0", - "engines": { - "node": ">=18" - } - }, - "node_modules/yocto-queue": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", - "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } } } } diff --git a/package.json b/package.json index 5757008..689281b 100644 --- a/package.json +++ b/package.json @@ -20,11 +20,5 @@ "bugs": { "url": "https://github.com/callstackincubator/ios/issues" }, - "homepage": "https://github.com/callstackincubator/ios#readme", - "dependencies": { - "@actions/core": "^1.11.1", - "@actions/github": "^6.0.0", - "@rnef/config": "^0.7.18", - "@rnef/tools": "^0.7.18" - } + "homepage": "https://github.com/callstackincubator/ios#readme" } From c5c74f38215d172ec4aaf9f288b5db00bdfe9b8f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Pierzcha=C5=82a?= Date: Fri, 6 Jun 2025 21:16:34 +0200 Subject: [PATCH 25/41] feat: upload to generic remote-cache provider --- action.yml | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/action.yml b/action.yml index 09f571a..88812b9 100644 --- a/action.yml +++ b/action.yml @@ -105,7 +105,15 @@ runs: shell: bash working-directory: ${{ inputs.working-directory }} + - name: Get Provider Name + run: | + PROVIDER_NAME=$(npx rnef remote-cache get-provider-name) + echo "PROVIDER_NAME=$PROVIDER_NAME" >> $GITHUB_ENV + shell: bash + working-directory: ${{ inputs.working-directory }} + - name: Populate GitHub Token in Cache + if: ${{ env.PROVIDER_NAME === "GitHub" }} run: | mkdir -p .rnef/cache echo "{\"githubToken\": \"${{ inputs.github-token }}\"}" > .rnef/cache/project.json @@ -257,15 +265,22 @@ runs: fi shell: bash - - name: Upload Artifact + # Special case for GitHub, as it doesn't support uploading through the API + - name: Upload Artifact to GitHub id: upload-artifact - if: ${{ !env.ARTIFACT_URL || (inputs.re-sign == 'true' && github.event_name == 'pull_request') }} + if: ${{ env.PROVIDER_NAME === "GitHub" && (!env.ARTIFACT_URL || (inputs.re-sign == 'true' && github.event_name == 'pull_request')) }} uses: actions/upload-artifact@v4 with: name: ${{ env.ARTIFACT_NAME }} path: ${{ env.ARTIFACT_PATH }} if-no-files-found: error + - name: Upload Artifact to Remote Cache + if: ${{ env.PROVIDER_NAME !== "GitHub" && (!env.ARTIFACT_URL || (inputs.re-sign == 'true' && github.event_name == 'pull_request')) }} + run: | + npx rnef remote-cache upload --name ${{ env.ARTIFACT_NAME }} + shell: bash + - name: Delete Old Re-Signed Artifacts if: ${{ env.ARTIFACT_URL && inputs.destination == 'device' && inputs.re-sign == 'true' && github.event_name == 'pull_request' }} run: | From fa632e0c7b65851275a7113c00b5693b33401d49 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Pierzcha=C5=82a?= Date: Fri, 6 Jun 2025 21:29:16 +0200 Subject: [PATCH 26/41] fix === -> == --- action.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/action.yml b/action.yml index 88812b9..3d5630d 100644 --- a/action.yml +++ b/action.yml @@ -113,7 +113,7 @@ runs: working-directory: ${{ inputs.working-directory }} - name: Populate GitHub Token in Cache - if: ${{ env.PROVIDER_NAME === "GitHub" }} + if: ${{ env.PROVIDER_NAME == "GitHub" }} run: | mkdir -p .rnef/cache echo "{\"githubToken\": \"${{ inputs.github-token }}\"}" > .rnef/cache/project.json @@ -268,7 +268,7 @@ runs: # Special case for GitHub, as it doesn't support uploading through the API - name: Upload Artifact to GitHub id: upload-artifact - if: ${{ env.PROVIDER_NAME === "GitHub" && (!env.ARTIFACT_URL || (inputs.re-sign == 'true' && github.event_name == 'pull_request')) }} + if: ${{ env.PROVIDER_NAME == "GitHub" && (!env.ARTIFACT_URL || (inputs.re-sign == 'true' && github.event_name == 'pull_request')) }} uses: actions/upload-artifact@v4 with: name: ${{ env.ARTIFACT_NAME }} @@ -276,7 +276,7 @@ runs: if-no-files-found: error - name: Upload Artifact to Remote Cache - if: ${{ env.PROVIDER_NAME !== "GitHub" && (!env.ARTIFACT_URL || (inputs.re-sign == 'true' && github.event_name == 'pull_request')) }} + if: ${{ env.PROVIDER_NAME != "GitHub" && (!env.ARTIFACT_URL || (inputs.re-sign == 'true' && github.event_name == 'pull_request')) }} run: | npx rnef remote-cache upload --name ${{ env.ARTIFACT_NAME }} shell: bash From 84ded078b8b01d42aaa9b5d0c7788c37567e6c2c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Pierzcha=C5=82a?= Date: Fri, 6 Jun 2025 21:31:59 +0200 Subject: [PATCH 27/41] singlequotes --- action.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/action.yml b/action.yml index 3d5630d..e3fbec8 100644 --- a/action.yml +++ b/action.yml @@ -113,7 +113,7 @@ runs: working-directory: ${{ inputs.working-directory }} - name: Populate GitHub Token in Cache - if: ${{ env.PROVIDER_NAME == "GitHub" }} + if: ${{ env.PROVIDER_NAME == 'GitHub' }} run: | mkdir -p .rnef/cache echo "{\"githubToken\": \"${{ inputs.github-token }}\"}" > .rnef/cache/project.json @@ -268,7 +268,7 @@ runs: # Special case for GitHub, as it doesn't support uploading through the API - name: Upload Artifact to GitHub id: upload-artifact - if: ${{ env.PROVIDER_NAME == "GitHub" && (!env.ARTIFACT_URL || (inputs.re-sign == 'true' && github.event_name == 'pull_request')) }} + if: ${{ env.PROVIDER_NAME == 'GitHub' && (!env.ARTIFACT_URL || (inputs.re-sign == 'true' && github.event_name == 'pull_request')) }} uses: actions/upload-artifact@v4 with: name: ${{ env.ARTIFACT_NAME }} @@ -276,7 +276,7 @@ runs: if-no-files-found: error - name: Upload Artifact to Remote Cache - if: ${{ env.PROVIDER_NAME != "GitHub" && (!env.ARTIFACT_URL || (inputs.re-sign == 'true' && github.event_name == 'pull_request')) }} + if: ${{ env.PROVIDER_NAME != 'GitHub' && (!env.ARTIFACT_URL || (inputs.re-sign == 'true' && github.event_name == 'pull_request')) }} run: | npx rnef remote-cache upload --name ${{ env.ARTIFACT_NAME }} shell: bash From ce9d43903a5ae6b89d57b5f346b685f8c47c82cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Pierzcha=C5=82a?= Date: Fri, 6 Jun 2025 22:45:05 +0200 Subject: [PATCH 28/41] set verbose --- action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.yml b/action.yml index e3fbec8..454514a 100644 --- a/action.yml +++ b/action.yml @@ -278,7 +278,7 @@ runs: - name: Upload Artifact to Remote Cache if: ${{ env.PROVIDER_NAME != 'GitHub' && (!env.ARTIFACT_URL || (inputs.re-sign == 'true' && github.event_name == 'pull_request')) }} run: | - npx rnef remote-cache upload --name ${{ env.ARTIFACT_NAME }} + npx rnef remote-cache upload --name ${{ env.ARTIFACT_NAME }} --verbose shell: bash - name: Delete Old Re-Signed Artifacts From b9a6d268ae3016d75e8eddc8e198db6f7a78d837 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Pierzcha=C5=82a?= Date: Fri, 6 Jun 2025 22:47:26 +0200 Subject: [PATCH 29/41] Revert "set verbose" This reverts commit b6cb3cd136369b6bfc3a702536cd008431884199. --- action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.yml b/action.yml index 454514a..e3fbec8 100644 --- a/action.yml +++ b/action.yml @@ -278,7 +278,7 @@ runs: - name: Upload Artifact to Remote Cache if: ${{ env.PROVIDER_NAME != 'GitHub' && (!env.ARTIFACT_URL || (inputs.re-sign == 'true' && github.event_name == 'pull_request')) }} run: | - npx rnef remote-cache upload --name ${{ env.ARTIFACT_NAME }} --verbose + npx rnef remote-cache upload --name ${{ env.ARTIFACT_NAME }} shell: bash - name: Delete Old Re-Signed Artifacts From e5383d12ffbb15ec227a2f0f3af88014b8fda071 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Pierzcha=C5=82a?= Date: Fri, 6 Jun 2025 22:51:11 +0200 Subject: [PATCH 30/41] verbose --- action.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/action.yml b/action.yml index e3fbec8..fbac231 100644 --- a/action.yml +++ b/action.yml @@ -212,7 +212,7 @@ runs: --configuration "${{ inputs.configuration }}" \ --build-folder build \ --destination ${{ inputs.destination }} \ - ${{ inputs.rnef-build-extra-params }} + ${{ inputs.rnef-build-extra-params }} --verbose shell: bash working-directory: ${{ inputs.working-directory }} @@ -278,7 +278,7 @@ runs: - name: Upload Artifact to Remote Cache if: ${{ env.PROVIDER_NAME != 'GitHub' && (!env.ARTIFACT_URL || (inputs.re-sign == 'true' && github.event_name == 'pull_request')) }} run: | - npx rnef remote-cache upload --name ${{ env.ARTIFACT_NAME }} + npx rnef remote-cache upload --name ${{ env.ARTIFACT_NAME }} --verbose shell: bash - name: Delete Old Re-Signed Artifacts From b9a9ceff2a6be1a9af3a532246b9e844fd73e576 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Pierzcha=C5=82a?= Date: Tue, 10 Jun 2025 17:32:06 +0200 Subject: [PATCH 31/41] set ARTIFACT_URL after upload --- action.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/action.yml b/action.yml index fbac231..39b3f86 100644 --- a/action.yml +++ b/action.yml @@ -278,7 +278,8 @@ runs: - name: Upload Artifact to Remote Cache if: ${{ env.PROVIDER_NAME != 'GitHub' && (!env.ARTIFACT_URL || (inputs.re-sign == 'true' && github.event_name == 'pull_request')) }} run: | - npx rnef remote-cache upload --name ${{ env.ARTIFACT_NAME }} --verbose + OUTPUT=$(npx rnef remote-cache upload --name ${{ env.ARTIFACT_NAME }} --json --verbose) + echo "ARTIFACT_URL=$(echo "$OUTPUT" | jq -r '.url')" >> $GITHUB_ENV shell: bash - name: Delete Old Re-Signed Artifacts From a19c0d4cd2f30c7764b623c29470b4ad024f4beb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Pierzcha=C5=82a?= Date: Tue, 10 Jun 2025 17:43:53 +0200 Subject: [PATCH 32/41] add logging --- action.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/action.yml b/action.yml index 39b3f86..59013ca 100644 --- a/action.yml +++ b/action.yml @@ -278,6 +278,9 @@ runs: - name: Upload Artifact to Remote Cache if: ${{ env.PROVIDER_NAME != 'GitHub' && (!env.ARTIFACT_URL || (inputs.re-sign == 'true' && github.event_name == 'pull_request')) }} run: | + ls -al $HOME/.rnef/cache/remote-build + ls -al $HOME/.rnef/cache/ios/archive + ls -al $HOME/.rnef/cache/ios/export OUTPUT=$(npx rnef remote-cache upload --name ${{ env.ARTIFACT_NAME }} --json --verbose) echo "ARTIFACT_URL=$(echo "$OUTPUT" | jq -r '.url')" >> $GITHUB_ENV shell: bash From 7079ca420096010ce8fd4fe9955bb2206e959aae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Pierzcha=C5=82a?= Date: Wed, 11 Jun 2025 15:34:16 +0200 Subject: [PATCH 33/41] update ls --- action.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/action.yml b/action.yml index 59013ca..81d326f 100644 --- a/action.yml +++ b/action.yml @@ -278,9 +278,11 @@ runs: - name: Upload Artifact to Remote Cache if: ${{ env.PROVIDER_NAME != 'GitHub' && (!env.ARTIFACT_URL || (inputs.re-sign == 'true' && github.event_name == 'pull_request')) }} run: | - ls -al $HOME/.rnef/cache/remote-build - ls -al $HOME/.rnef/cache/ios/archive - ls -al $HOME/.rnef/cache/ios/export + ls -al /Users/runner/work/rnef-remote-build-test/rnef-remote-build-test/.rnef/cache/remote-build + ls -al /Users/runner/work/rnef-remote-build-test/rnef-remote-build-test/.rnef/cache/ios/archive + ls -al /Users/runner/work/rnef-remote-build-test/rnef-remote-build-test/.rnef/cache/ios/export + ls -al /Users/runner/work/rnef-remote-build-test/rnef-remote-build-test/ios/build/Build/Products + ls -al /Users/runner/work/rnef-remote-build-test/rnef-remote-build-test/ios/build/Build/Products/Release-iphoneos OUTPUT=$(npx rnef remote-cache upload --name ${{ env.ARTIFACT_NAME }} --json --verbose) echo "ARTIFACT_URL=$(echo "$OUTPUT" | jq -r '.url')" >> $GITHUB_ENV shell: bash From f6f355e8af566533d0ec2aac5f8c960ae51bd6f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Pierzcha=C5=82a?= Date: Wed, 11 Jun 2025 17:40:13 +0200 Subject: [PATCH 34/41] remove ls --- action.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/action.yml b/action.yml index 81d326f..39b3f86 100644 --- a/action.yml +++ b/action.yml @@ -278,11 +278,6 @@ runs: - name: Upload Artifact to Remote Cache if: ${{ env.PROVIDER_NAME != 'GitHub' && (!env.ARTIFACT_URL || (inputs.re-sign == 'true' && github.event_name == 'pull_request')) }} run: | - ls -al /Users/runner/work/rnef-remote-build-test/rnef-remote-build-test/.rnef/cache/remote-build - ls -al /Users/runner/work/rnef-remote-build-test/rnef-remote-build-test/.rnef/cache/ios/archive - ls -al /Users/runner/work/rnef-remote-build-test/rnef-remote-build-test/.rnef/cache/ios/export - ls -al /Users/runner/work/rnef-remote-build-test/rnef-remote-build-test/ios/build/Build/Products - ls -al /Users/runner/work/rnef-remote-build-test/rnef-remote-build-test/ios/build/Build/Products/Release-iphoneos OUTPUT=$(npx rnef remote-cache upload --name ${{ env.ARTIFACT_NAME }} --json --verbose) echo "ARTIFACT_URL=$(echo "$OUTPUT" | jq -r '.url')" >> $GITHUB_ENV shell: bash From 2d972e007d88e54dbce1dfb452692dcaf5ac3d1d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Pierzcha=C5=82a?= Date: Wed, 11 Jun 2025 20:52:42 +0200 Subject: [PATCH 35/41] try binary-path --- action.yml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/action.yml b/action.yml index 39b3f86..52f701c 100644 --- a/action.yml +++ b/action.yml @@ -275,8 +275,15 @@ runs: path: ${{ env.ARTIFACT_PATH }} if-no-files-found: error - - name: Upload Artifact to Remote Cache - if: ${{ env.PROVIDER_NAME != 'GitHub' && (!env.ARTIFACT_URL || (inputs.re-sign == 'true' && github.event_name == 'pull_request')) }} + - name: Upload Artifact to Remote Cache for re-signed builds + if: ${{ env.PROVIDER_NAME != 'GitHub' && (inputs.re-sign == 'true' && github.event_name == 'pull_request') }} + run: | + OUTPUT=$(npx rnef remote-cache upload --name ${{ env.ARTIFACT_NAME }} --binary-path ${{ env.ARTIFACT_PATH }} --json --verbose) + echo "ARTIFACT_URL=$(echo "$OUTPUT" | jq -r '.url')" >> $GITHUB_ENV + shell: bash + + - name: Upload Artifact to Remote Cache for regular builds + if: ${{ env.PROVIDER_NAME != 'GitHub' && !env.ARTIFACT_URL }} run: | OUTPUT=$(npx rnef remote-cache upload --name ${{ env.ARTIFACT_NAME }} --json --verbose) echo "ARTIFACT_URL=$(echo "$OUTPUT" | jq -r '.url')" >> $GITHUB_ENV From 744747cc6fcd92ca1cfabe03ccd7b8c0d29f263d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Pierzcha=C5=82a?= Date: Wed, 11 Jun 2025 21:04:48 +0200 Subject: [PATCH 36/41] check non-pr build too --- action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.yml b/action.yml index 52f701c..63011e4 100644 --- a/action.yml +++ b/action.yml @@ -135,7 +135,7 @@ runs: shell: bash - name: Check if regular artifact exists - if: ${{ !env.ARTIFACT_TRAITS }} + if: ${{ !env.ARTIFACT_NAME }} run: | ARTIFACT_TRAITS="${{ inputs.destination }},${{ inputs.configuration }}" echo "ARTIFACT_TRAITS=$ARTIFACT_TRAITS" >> $GITHUB_ENV From 197afe05ef6f5fa00969a25f47c18611bcc1bb0d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Pierzcha=C5=82a?= Date: Wed, 11 Jun 2025 21:07:28 +0200 Subject: [PATCH 37/41] fix backtick --- action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.yml b/action.yml index 63011e4..b3b9308 100644 --- a/action.yml +++ b/action.yml @@ -292,7 +292,7 @@ runs: - name: Delete Old Re-Signed Artifacts if: ${{ env.ARTIFACT_URL && inputs.destination == 'device' && inputs.re-sign == 'true' && github.event_name == 'pull_request' }} run: | - npx rnef remote-cache delete --name ${{ env.ARTIFACT_NAME }} --all-but-latest` --json + npx rnef remote-cache delete --name ${{ env.ARTIFACT_NAME }} --all-but-latest --json shell: bash - name: Clean Up Code Signing (device builds only) From e6122fc76581d8ac8e84540ed4c856f94ad73f06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Pierzcha=C5=82a?= Date: Wed, 11 Jun 2025 21:32:49 +0200 Subject: [PATCH 38/41] change verbose --- action.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/action.yml b/action.yml index b3b9308..c6c4778 100644 --- a/action.yml +++ b/action.yml @@ -212,7 +212,8 @@ runs: --configuration "${{ inputs.configuration }}" \ --build-folder build \ --destination ${{ inputs.destination }} \ - ${{ inputs.rnef-build-extra-params }} --verbose + --verbose \ + ${{ inputs.rnef-build-extra-params }} shell: bash working-directory: ${{ inputs.working-directory }} From 5667ae593010c0e8c4dff022197c33eff6fc4e53 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Pierzcha=C5=82a?= Date: Mon, 16 Jun 2025 13:42:53 +0200 Subject: [PATCH 39/41] simplify validation --- action.yml | 30 ++++++------------------------ 1 file changed, 6 insertions(+), 24 deletions(-) diff --git a/action.yml b/action.yml index c6c4778..775f316 100644 --- a/action.yml +++ b/action.yml @@ -68,30 +68,12 @@ runs: fi if [ "${{ inputs.destination }}" == "device" ]; then - if [ -z "${{ inputs.certificate-base64 }}" ]; then - echo "Input 'certificate-base64' is required for device builds." - exit 1 - fi - - if [ -z "${{ inputs.certificate-password }}" ]; then - echo " Input 'certificate-password' is required for device builds." - exit 1 - fi - - if [ -z "${{ inputs.provisioning-profile-base64 }}" ]; then - echo "Input 'provisioning-profile-base64' is required for device builds." - exit 1 - fi - - if [ -z "${{ inputs.provisioning-profile-name }}" ]; then - echo "Input 'provisioning-profile-name' is required for device builds." - exit 1 - fi - - if [ -z "${{ inputs.keychain-password }}" ]; then - echo "Input 'keychain-password' is required for device builds." - exit 1 - fi + for input in "certificate-base64" "certificate-password" "provisioning-profile-base64" "provisioning-profile-name" "keychain-password"; do + if [ -z "${{ inputs[input] }}" ]; then + echo "Input '$input' is required for device builds." + exit 1 + fi + done fi shell: bash From 219f5cd9a1b1f545d5d812a6c91f6dedb391e039 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Pierzcha=C5=82a?= Date: Wed, 18 Jun 2025 11:09:23 +0200 Subject: [PATCH 40/41] update fingerprint output --- action.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/action.yml b/action.yml index 775f316..a55c456 100644 --- a/action.yml +++ b/action.yml @@ -80,10 +80,8 @@ runs: - name: Native Fingerprint id: fingerprint run: | - FINGERPRINT_OUTPUT=$(npx rnef fingerprint -p ios --verbose) - echo "$FINGERPRINT_OUTPUT" >&2 - FINGERPRINT=$(echo "$FINGERPRINT_OUTPUT" | grep -oE '[a-f0-9]{40}') - echo "FINGERPRINT=$FINGERPRINT" >> $GITHUB_ENV + FINGERPRINT_OUTPUT=$(npx rnef fingerprint -p ios --raw) + echo "FINGERPRINT=$FINGERPRINT_OUTPUT" >> $GITHUB_ENV shell: bash working-directory: ${{ inputs.working-directory }} From f224c195aa494af61966f0c3801697b5824ef822 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Pierzcha=C5=82a?= Date: Wed, 18 Jun 2025 11:12:55 +0200 Subject: [PATCH 41/41] Revert "simplify validation" This reverts commit 1384d11c8dae88eec0f7b5690fd28ddb22523b46. --- action.yml | 30 ++++++++++++++++++++++++------ 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/action.yml b/action.yml index a55c456..cba7e76 100644 --- a/action.yml +++ b/action.yml @@ -68,12 +68,30 @@ runs: fi if [ "${{ inputs.destination }}" == "device" ]; then - for input in "certificate-base64" "certificate-password" "provisioning-profile-base64" "provisioning-profile-name" "keychain-password"; do - if [ -z "${{ inputs[input] }}" ]; then - echo "Input '$input' is required for device builds." - exit 1 - fi - done + if [ -z "${{ inputs.certificate-base64 }}" ]; then + echo "Input 'certificate-base64' is required for device builds." + exit 1 + fi + + if [ -z "${{ inputs.certificate-password }}" ]; then + echo " Input 'certificate-password' is required for device builds." + exit 1 + fi + + if [ -z "${{ inputs.provisioning-profile-base64 }}" ]; then + echo "Input 'provisioning-profile-base64' is required for device builds." + exit 1 + fi + + if [ -z "${{ inputs.provisioning-profile-name }}" ]; then + echo "Input 'provisioning-profile-name' is required for device builds." + exit 1 + fi + + if [ -z "${{ inputs.keychain-password }}" ]; then + echo "Input 'keychain-password' is required for device builds." + exit 1 + fi fi shell: bash