From 8b88f8ccae2ee95dd8751ed1cb359dd046fab9ad Mon Sep 17 00:00:00 2001 From: snomiao Date: Wed, 29 Oct 2025 10:55:52 +0000 Subject: [PATCH] [fix] Preserve API changelog scripts when checking out previous version MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Copy snapshot and comparison scripts to /tmp before checking out previous version - Restore scripts after checkout to ensure they're available in older versions - Fixes MODULE_NOT_FOUND error when running snapshot on previous versions 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- .github/workflows/release-api-changelogs.yaml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.github/workflows/release-api-changelogs.yaml b/.github/workflows/release-api-changelogs.yaml index 6964ac92b..6ffb1d3fb 100644 --- a/.github/workflows/release-api-changelogs.yaml +++ b/.github/workflows/release-api-changelogs.yaml @@ -92,6 +92,13 @@ jobs: echo "Current API snapshot created" + - name: Preserve scripts for previous version + if: steps.previous_version.outputs.tag != '' + run: | + # Copy scripts to temporary location to use with previous version + mkdir -p /tmp/api-changelog-scripts + cp scripts/snapshot-api.js scripts/compare-api-snapshots.js /tmp/api-changelog-scripts/ + - name: Checkout previous version if: steps.previous_version.outputs.tag != '' run: | @@ -101,6 +108,10 @@ jobs: # Checkout previous version git checkout ${{ steps.previous_version.outputs.tag }} + # Restore scripts + mkdir -p scripts + cp /tmp/api-changelog-scripts/*.js scripts/ + - name: Build previous types if: steps.previous_version.outputs.tag != '' run: |