From 05673e575dd70f90116c44576c43d5c45f601109 Mon Sep 17 00:00:00 2001 From: Callum Dunster Date: Mon, 8 Jun 2026 11:48:53 +0200 Subject: [PATCH 1/2] feat: pack the NPM package before generating the release-notes --- .github/workflows/nodejs-publish-release.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/nodejs-publish-release.yml b/.github/workflows/nodejs-publish-release.yml index e046b23..8b63dfc 100644 --- a/.github/workflows/nodejs-publish-release.yml +++ b/.github/workflows/nodejs-publish-release.yml @@ -110,6 +110,9 @@ jobs: git tag "v$RELEASE_VERSION" git push origin "v$RELEASE_VERSION" + - name: Pack npm artifact + run: npm pack + - name: Extract release notes from changelog env: RELEASE_VERSION: ${{ steps.version.outputs.value }} @@ -126,9 +129,6 @@ jobs: exit 1 fi - - name: Pack npm artifact - run: npm pack - - name: Create GitHub release env: GH_TOKEN: ${{ github.token }} From 91415b0bbcc4747f174a89b1e8afe55c42bd698c Mon Sep 17 00:00:00 2001 From: Callum Dunster Date: Mon, 8 Jun 2026 11:53:02 +0200 Subject: [PATCH 2/2] feat: publish NPM package generated by `npm pack` step --- .github/workflows/nodejs-publish-release.yml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/nodejs-publish-release.yml b/.github/workflows/nodejs-publish-release.yml index 8b63dfc..1d5a66a 100644 --- a/.github/workflows/nodejs-publish-release.yml +++ b/.github/workflows/nodejs-publish-release.yml @@ -111,7 +111,10 @@ jobs: git push origin "v$RELEASE_VERSION" - name: Pack npm artifact - run: npm pack + id: pack + run: | + TARBALL=$(npm pack) + echo "tarball=$TARBALL" >> "$GITHUB_OUTPUT" - name: Extract release notes from changelog env: @@ -142,7 +145,7 @@ jobs: --title "v$RELEASE_VERSION" \ --notes-file release-notes.md \ $PRERELEASE_FLAG \ - ./*.tgz + "${{ steps.pack.outputs.tarball }}" - name: Publish to npm env: @@ -155,7 +158,7 @@ jobs: exit 1 fi if [[ "$RELEASE_VERSION" == *"-"* ]]; then - npm publish --access public --provenance --tag next + npm publish "${{ steps.pack.outputs.tarball }}" --access public --provenance --tag next else - npm publish --access public --provenance + npm publish "${{ steps.pack.outputs.tarball }}" --access public --provenance fi