From 37acbf56cf13e2dcf96aa590891c4d47f4d71f74 Mon Sep 17 00:00:00 2001 From: Matt Robenolt Date: Tue, 24 Mar 2026 12:04:53 -0700 Subject: [PATCH 1/2] Add npm trusted publisher workflow, remove GitHub Packages postpublish Enables automated npm publishing via OIDC when a v* tag is pushed. Removes the postpublish hook that mirrored to GitHub Packages. --- .github/workflows/publish.yml | 24 ++++++++++++++++++++++++ package.json | 3 +-- 2 files changed, 25 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/publish.yml diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..a07aaa8 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,24 @@ +name: Publish Package + +on: + push: + tags: + - 'v*' + +permissions: + id-token: write + contents: read + +jobs: + publish: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: '20' + registry-url: 'https://registry.npmjs.org' + - run: npm ci + - run: npm run build + - run: npm test + - run: npm publish --provenance --access public diff --git a/package.json b/package.json index 1558f75..c06510a 100644 --- a/package.json +++ b/package.json @@ -34,8 +34,7 @@ "pretest": "npm run build", "test": "jest", "version": "echo \"export const Version = '$npm_package_version'\" > src/version.ts && git add src/version.ts && npm run build", - "prepublishOnly": "npm run build", - "postpublish": "npm publish --ignore-scripts --@planetscale:registry='https://npm.pkg.github.com'" + "prepublishOnly": "npm run build" }, "repository": { "type": "git", From 0f8a5304ee155743cd6e45ae766c858168cf3b9a Mon Sep 17 00:00:00 2001 From: Matt Robenolt Date: Tue, 24 Mar 2026 12:08:56 -0700 Subject: [PATCH 2/2] Add GitHub Release step with auto-generated release notes --- .github/workflows/publish.yml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index a07aaa8..f096621 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -7,18 +7,21 @@ on: permissions: id-token: write - contents: read + contents: write jobs: publish: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 + - uses: actions/checkout@v6 + - uses: actions/setup-node@v6 with: - node-version: '20' + node-version: '24' registry-url: 'https://registry.npmjs.org' - run: npm ci - run: npm run build - run: npm test - run: npm publish --provenance --access public + - uses: softprops/action-gh-release@v2 + with: + generate_release_notes: true