Skip to content

👷 ci: release workflow with npm trusted publishing - #7

Merged
maurodesouza merged 3 commits into
mainfrom
ci/npm-release
Nov 18, 2026
Merged

maurodesouza merged 3 commits into
mainfrom
ci/npm-release

Conversation

@maurodesouza

Copy link
Copy Markdown
Contributor

Summary

Publishing for the fragiola package, the same pipeline as fragiola/dockable for a single package:

  • Changesets versions the package. On every push to main, .github/workflows/release.yml either opens/updates the Version Packages PR, or (once it is merged) packs the package, checks that tarball and publishes it with pnpm over npm trusted publishing (OIDC, with provenance, no npm token), then pushes the fragiola@<version> tag and creates the GitHub release. Actions are pinned by commit, as in Dockable.
  • pnpm check:package (scripts/check-package.ts): packs with pnpm, checks the tarball ships only dist/ + manifest files and every bin/exports target, runs publint (strict) and attw (esm-only), then installs it with npm in a scratch project and runs fragiola --version, both exports and an MCP initialize + tools/list over stdio. The release's pack job runs it on the very tarball it publishes (--tarballs).
  • CI: new Package and Changesets jobs; tests now run on PRs only (as in Dockable), since a push to main runs the release.
  • .changeset/first-release.md releases 0.1.0.
  • docs/releasing.md: the maintainer's first steps and the later-release / failure runbook. AGENTS.md and README updated.

Before merging

Merging this PR starts the release (it opens the Version Packages PR). Do steps 1–4 of docs/releasing.md first: the workflow permission to open PRs, the npm environment (main only), the 0.0.0 stub published by hand with pnpm, and npm trust github fragiola --file release.yml --repo fragiola/cli --environment npm --allow-publish.

Notes

  • Biome 2.6 formats Markdown and rewrote the changeset frontmatter into a heading, which Changesets cannot parse: .changeset/*.md and CHANGELOG.md are excluded from Biome.
  • A single-package repo has no "root tools only" install, so the publish job installs the lockfile with --ignore-scripts (Dockable filters {.}): the dependencies are present next to the OIDC token but never run.

Validation

pnpm check, pnpm typecheck, pnpm test (96 passed, 5 new for the check's helpers), pnpm check:package (✓ fragiola@0.0.0 can be published), pnpm changeset status --since=origin/main (fragiola → 0.1.0).

🤖 Generated with Claude Code

maurodesouza and others added 2 commits November 15, 2026 17:32
Changesets versions the package and release.yml publishes it with pnpm over OIDC, the
pipeline of fragiola/dockable for a single package. `pnpm check:package` packs the
package, checks the tarball (files, publint, attw) and smoke-tests it from a scratch
project; CI runs it, and the release's pack job runs it on the tarball it publishes.
CI's Changesets job asks for a changeset on every PR that changes what ships. The first
changeset releases 0.1.0.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@maurodesouza
maurodesouza merged commit 3abc200 into main Nov 18, 2026
3 checks passed
@maurodesouza
maurodesouza deleted the ci/npm-release branch November 18, 2026 21:18
@github-actions github-actions Bot mentioned this pull request Nov 18, 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.

1 participant