diff --git a/.github/workflows/nodejs-publish-release.yml b/.github/workflows/nodejs-publish-release.yml index e046b23..1d5a66a 100644 --- a/.github/workflows/nodejs-publish-release.yml +++ b/.github/workflows/nodejs-publish-release.yml @@ -110,6 +110,12 @@ jobs: git tag "v$RELEASE_VERSION" git push origin "v$RELEASE_VERSION" + - name: Pack npm artifact + id: pack + run: | + TARBALL=$(npm pack) + echo "tarball=$TARBALL" >> "$GITHUB_OUTPUT" + - name: Extract release notes from changelog env: RELEASE_VERSION: ${{ steps.version.outputs.value }} @@ -126,9 +132,6 @@ jobs: exit 1 fi - - name: Pack npm artifact - run: npm pack - - name: Create GitHub release env: GH_TOKEN: ${{ github.token }} @@ -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