From 9bf7fa34e2bd1438fb64825579d7b837ed7920ab Mon Sep 17 00:00:00 2001 From: Peter Svensson Date: Fri, 6 Mar 2026 16:12:00 +0100 Subject: [PATCH 1/3] ci: rename job to CI for consistent status check naming Co-Authored-By: Claude Opus 4.6 --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e85ca2f..85823f7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,6 +10,7 @@ permissions: jobs: test: + name: CI runs-on: ubuntu-latest services: nats: From 9b6714ccc823299a1aeabf635c69b960dc9a9da5 Mon Sep 17 00:00:00 2001 From: Peter Svensson Date: Fri, 6 Mar 2026 16:36:50 +0100 Subject: [PATCH 2/3] chore: add package metadata, release-please, and npm publish - Add license, description, and repository fields to package.json - Update exports to point to dist/ for published builds - Set version to 0.0.0 and publish to GitHub Packages - Add release-please workflow with npm build and publish on release - Set zizmor --min-confidence=medium to skip low-confidence findings Co-Authored-By: Claude Opus 4.6 --- .github/workflows/release.yml | 41 +++++++++++++++++++++++++++++++++++ .pre-commit-config.yaml | 1 + .release-please-manifest.json | 3 +++ package.json | 15 +++++++++---- release-please-config.json | 10 +++++++++ 5 files changed, 66 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/release.yml create mode 100644 .release-please-manifest.json create mode 100644 release-please-config.json diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..cebbb7e --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,41 @@ +name: Release + +on: + push: + branches: [main] + +permissions: + contents: write + pull-requests: write + packages: write + +jobs: + release: + runs-on: ubuntu-latest + steps: + - uses: googleapis/release-please-action@16a9c90856f42705d54a6fda1823352bdc62cf38 # v4.4.0 + id: release + with: + token: ${{ secrets.GITHUB_TOKEN }} + + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + if: ${{ steps.release.outputs.release_created }} + with: + persist-credentials: false + + - uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0 + if: ${{ steps.release.outputs.release_created }} + with: + node-version: "22" + cache: "" + registry-url: "https://npm.pkg.github.com" + + # GitHub Packages does not support OIDC trusted publishing + - name: Build and publish to GitHub Packages # zizmor: ignore[use-trusted-publishing] + if: ${{ steps.release.outputs.release_created }} + run: | + npm ci + npm run build + npm publish + env: + NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 8e34b2d..6881cfc 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -17,3 +17,4 @@ repos: rev: v1.22.0 hooks: - id: zizmor + args: ["--min-confidence=medium"] diff --git a/.release-please-manifest.json b/.release-please-manifest.json new file mode 100644 index 0000000..e18ee07 --- /dev/null +++ b/.release-please-manifest.json @@ -0,0 +1,3 @@ +{ + ".": "0.0.0" +} diff --git a/package.json b/package.json index 6741ead..c448fc4 100644 --- a/package.json +++ b/package.json @@ -1,14 +1,21 @@ { "name": "@sparetimecoders/messaging-nats", - "version": "0.1.0", + "version": "0.0.0", + "description": "NATS transport for sparetimecoders messaging libraries", + "license": "MIT", + "repository": { + "type": "git", + "url": "https://github.com/sparetimecoders/nodejs-messaging-nats.git" + }, "type": "module", "exports": { ".": { - "import": "./src/index.ts", - "types": "./src/index.ts" + "import": "./dist/index.js", + "types": "./dist/index.d.ts" } }, "files": [ + "dist", "src" ], "scripts": { @@ -27,6 +34,6 @@ "vitest": "^3.0.5" }, "publishConfig": { - "access": "public" + "registry": "https://npm.pkg.github.com" } } diff --git a/release-please-config.json b/release-please-config.json new file mode 100644 index 0000000..959d0a6 --- /dev/null +++ b/release-please-config.json @@ -0,0 +1,10 @@ +{ + "$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json", + "packages": { + ".": { + "release-type": "node", + "bump-minor-pre-major": true, + "bump-patch-for-minor-pre-major": true + } + } +} From 317d757286709629bc4f778219e23e8b3ec2ede8 Mon Sep 17 00:00:00 2001 From: Peter Svensson Date: Fri, 6 Mar 2026 21:03:48 +0100 Subject: [PATCH 3/3] fix: allow github-actions[bot] through review gate Co-Authored-By: Claude Opus 4.6 --- .github/workflows/review-gate.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/review-gate.yaml b/.github/workflows/review-gate.yaml index a9b7e5b..bedeed5 100644 --- a/.github/workflows/review-gate.yaml +++ b/.github/workflows/review-gate.yaml @@ -20,7 +20,7 @@ jobs: PR_NUMBER: ${{ github.event.pull_request.number }} REPO: ${{ github.repository }} run: | - if [ "$PR_AUTHOR" = "peter-svensson" ]; then + if [ "$PR_AUTHOR" = "peter-svensson" ] || [ "$PR_AUTHOR" = "github-actions[bot]" ]; then echo "PR by $PR_AUTHOR, no review required" exit 0 fi