From 0271c20e840fa2eb3b55bd141ff6f2765b18c72f Mon Sep 17 00:00:00 2001 From: Andre Wiggins Date: Thu, 2 Apr 2026 15:43:12 -0700 Subject: [PATCH] Upload CDN types diff as workflow artifact When the check-cdn-types workflow detects changes between the CDN and published npm types, the raw diff is now written to a file and uploaded as a GitHub Actions artifact (cdn-types-diff, 30-day retention). This makes it easier to inspect the exact changes outside of the PR body, especially for large diffs that get truncated. --- .github/workflows/check-cdn-types.yml | 8 ++++++++ packages/app-bridge-types/scripts/check-cdn-updates.mjs | 6 ++++++ 2 files changed, 14 insertions(+) diff --git a/.github/workflows/check-cdn-types.yml b/.github/workflows/check-cdn-types.yml index 1225966..a8ae0e3 100644 --- a/.github/workflows/check-cdn-types.yml +++ b/.github/workflows/check-cdn-types.yml @@ -30,6 +30,14 @@ jobs: id: check run: node packages/app-bridge-types/scripts/check-cdn-updates.mjs + - name: Upload diff artifact + if: steps.check.outputs.has_changes == 'true' + uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0 + with: + name: cdn-types-diff + path: ${{ steps.check.outputs.diff_file }} + retention-days: 30 + - name: Create PR if: steps.check.outputs.has_changes == 'true' env: diff --git a/packages/app-bridge-types/scripts/check-cdn-updates.mjs b/packages/app-bridge-types/scripts/check-cdn-updates.mjs index 74165bf..fe79acd 100644 --- a/packages/app-bridge-types/scripts/check-cdn-updates.mjs +++ b/packages/app-bridge-types/scripts/check-cdn-updates.mjs @@ -179,8 +179,14 @@ Merging this PR will trigger a patch release of \`@shopify/app-bridge-types\`. const prBodyFile = join(tempDir, 'pr-body.md'); writeFileSync(prBodyFile, prBody); +// Write diff to a file for artifact upload +const diffFile = join(tempDir, 'cdn-types.diff'); +writeFileSync(diffFile, diff); + setOutput('has_changes', 'true'); setOutput('pr_body_file', prBodyFile); +setOutput('diff_file', diffFile); +console.log(`Diff written to ${diffFile}`); console.log(`PR body written to ${prBodyFile}`); console.log('Done.');