From 2b115fe385d4676c8297c092ec9073ae18c4a39b Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 6 Jul 2026 11:55:41 +0000 Subject: [PATCH 1/2] Add release workflow with npm trusted publishing MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Publishes on v* tags (or manual dispatch) via npm trusted publishing (OIDC) — no token secret needed since the trusted publisher on npmjs.com points at this workflow. Verifies the tag matches the package.json version before publishing; prepublishOnly covers typecheck, tests, build, and package checks. Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_01PpZiDrF7W2MG7ARnoBChaT --- .github/workflows/release.yml | 52 +++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..0fcaa44 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,52 @@ +name: Release + +on: + push: + tags: ["v*"] + workflow_dispatch: + +permissions: + contents: read + # Required for npm trusted publishing (OIDC). + id-token: write + +jobs: + publish: + # Trusted publishing requires a GitHub-hosted runner. + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: pnpm/action-setup@v4 + with: + version: 10 + + - uses: actions/setup-node@v4 + with: + node-version: 24 + cache: pnpm + registry-url: https://registry.npmjs.org + + # Trusted publishing needs npm >= 11.5.1. + - name: Update npm + run: npm install -g npm@latest + + - name: Install dependencies + run: pnpm install --frozen-lockfile + + - name: Verify tag matches package.json version + if: github.ref_type == 'tag' + run: | + pkg="$(node -p "require('./package.json').version")" + tag="${GITHUB_REF_NAME#v}" + if [ "$pkg" != "$tag" ]; then + echo "Tag v$tag does not match package.json version $pkg" >&2 + exit 1 + fi + + # Publishes via npm trusted publishing (OIDC) — the trusted publisher + # for this package on npmjs.com points at this workflow file, so no + # token is needed. Provenance is generated automatically. + # prepublishOnly runs typecheck, tests, build, and package checks. + - name: Publish to npm + run: npm publish --access public From a2266b77e2c4c723c723b22711baab51a3b86d5c Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 6 Jul 2026 11:58:47 +0000 Subject: [PATCH 2/2] Set version to 0.0.5 for 0.0.x versioning scheme npm's latest published version is 0.0.4; the repo's 0.1.0 was out of line with the project's 0.0.x-only versioning. Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_01PpZiDrF7W2MG7ARnoBChaT --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 1f152de..a5074ae 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "stringent", - "version": "0.1.0", + "version": "0.0.5", "description": "A smart and type-safe expression parser with compile-time validation, inference and runtime evaluation", "keywords": [ "parser",