Skip to content

ci: add tag-triggered npm publish workflow - #19

Open
mgcrea wants to merge 4 commits into
mainfrom
claude/pr-review-merge-x16lcw
Open

ci: add tag-triggered npm publish workflow#19
mgcrea wants to merge 4 commits into
mainfrom
claude/pr-review-merge-x16lcw

Conversation

@mgcrea

@mgcrea mgcrea commented Sep 1, 2026

Copy link
Copy Markdown
Owner

Summary

Adds a Publish Package workflow that publishes to npm when a semver tag is pushed.

The only file this PR changes is .github/workflows/publish.yaml (+55). The scale/opacity/transform changes shown in the diff view are already on main — they landed via #10, #11 and #17. They appear here only because this branch merged those same feature branches independently of main, producing a criss-cross merge base. git diff main <branch> reports one changed file.

What the workflow does

Triggered by a pushed semver tag (or manual dispatch):

  1. Verifies the tag matches package.json version, failing fast on mismatch
  2. Runs the full gate — lint, typecheck, vitest, build
  3. Publishes with npm publish --access public --provenance

Notes

  • Publishes with npm, not pnpm. pnpm publish accepts --provenance and silently ignores it — a dry run exits 0 with no attestation and no warning. npm publish implements it via the OIDC token. pnpm still handles install and the test gate.
  • Requires an NPM_TOKEN repository secret. Not yet configured; the publish step is last, so without it the run goes green until the final step.
  • permissions is contents: read + id-token: write — the latter is what provenance needs; nothing in the job writes to the repo.

Before the first release

These merged PRs are all feat:, and #10 changes scale-999 from returning null to 9.99. That makes the next version 0.17.0, not a patch. The workflow's version guard will reject a mismatched tag, so bump package.json before tagging.

Suggested merge

Squash — this branch carries two stale merge commits whose content is already on main.

claude and others added 4 commits August 26, 2026 08:59
Publishes to npm when a semver tag is pushed. Runs the full lint/check/spec/build
gate first and fails fast if the tag does not match package.json version.
Uses OIDC provenance; requires an NPM_TOKEN repository secret.
pnpm publish accepts --provenance but silently ignores it, which would
produce a successful publish with no attestation. npm publish implements
provenance via the OIDC token, so use it for the publish step while keeping
pnpm for install and the build/test gate.
@mgcrea mgcrea changed the title Add percentage support for scale and opacity utilities ci: add tag-triggered npm publish workflow Sep 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants