Repository navigation
release: v2.3.1 (republish v2.3.0 contents, fix release workflow) - #11
Merged
Merged
Conversation
Republish the v2.3.0 contents to npm and fix the release workflow. - Workflow trigger is now push:tags with semver-only pattern (no 'v' prefix), matching the historical convention used from 1.0.0 to 2.2.0. - workflow_dispatch + force_publish are gone; they were incompatible with npm Trusted Publishing (npm validates the calling workflow, not the workflow file containing npm publish, and returns 404). - The workflow verifies that the pushed tag matches package.json version before doing anything, then runs lint/test/build, creates the GitHub Release with notes from CHANGELOG.md, and publishes to npm with provenance via OIDC. No code changes vs v2.3.0; this is purely a release-plumbing fix.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context
v2.3.0 was tagged on GitHub but never reached npm. The publish call failed with:
Per the npm Trusted Publishing docs:
This explains the 404: the dispatch-triggered run could not pass npm's calling-workflow validation, even though sigstore signed the provenance (sigstore does not enforce that validation; npm does).
Fix
push: tags: '[0-9]+.[0-9]+.[0-9]+'. The recommended pattern from the official npm docs, adapted to our historical tag convention.workflow_dispatchandforce_publishare removed.package.jsonversionbefore doing anything.package.json, commits, merges tomain, and pushes a tag. The workflow does the rest (lint, test, build, GitHub Release,npm publish --provenance --access public).Tag naming
v2.3.0 was tagged as
v2.3.0. That broke the repo's historical convention (1.0.0...2.2.0, novprefix). This PR restores the convention and the new trigger pattern matches it.Release procedure once this lands
That triggers the workflow. npm gets
undisclosed@2.3.1with provenance; GitHub gets a2.3.1Release.v2.3.0 in npm
v2.3.0 stays as a GitHub Release/tag with no corresponding npm package. v2.3.1 has identical functional content. The v2.3.0 GitHub Release will be edited post-merge to point users at v2.3.1.
Test plan
ci.ymlstill on Node 16).main, push tag2.3.1. The new workflow runs end-to-end, creates the GitHub Release, and publishes to npm with provenance.npm view undisclosed@2.3.1 versionreturns2.3.1.npm view undisclosed dist-tags.latestreturns2.3.1.