From 2e42158f82ab7ed604470a042f2b308e9e8816dc Mon Sep 17 00:00:00 2001 From: capskip Date: Sun, 26 Jul 2026 04:33:11 +0800 Subject: [PATCH] Create a GitHub release when a version tag is published Tagging published the package to npm but never created a release, so the repo's Releases page stayed on the previous version. The PHP SDK's workflow already did this; this brings Node.js in line. Notes are auto-generated from merged PRs and can be edited afterwards. The job now needs contents: write to create the release. --- .github/workflows/publish.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index bfb7ab2..e38849b 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -13,7 +13,7 @@ jobs: name: Build and publish to npm runs-on: ubuntu-latest permissions: - contents: read + contents: write # required to create the GitHub release id-token: write # required for npm Trusted Publishing (OIDC) + provenance steps: - name: Checkout @@ -36,3 +36,12 @@ jobs: # Publishes via npm Trusted Publishing (OIDC) using the id-token permission # above — no NPM_TOKEN secret required. Build provenance is emitted too. run: npm publish --provenance --access public + + # Without this the tag ships to npm but never appears on the repo's + # Releases page. Notes are auto-generated from merged PRs and can be + # edited afterwards. + - name: Create GitHub release + uses: softprops/action-gh-release@v2 + with: + name: CapSkip Node.js SDK ${{ github.ref_name }} + generate_release_notes: true