Skip to content

ci: automate releases with release-please and npm trusted publishing - #33

Merged
simonepri merged 1 commit into
mainfrom
ci/release-automation
Jun 8, 2026
Merged

ci: automate releases with release-please and npm trusted publishing#33
simonepri merged 1 commit into
mainfrom
ci/release-automation

Conversation

@simonepri

@simonepri simonepri commented Jun 8, 2026

Copy link
Copy Markdown
Owner

Sets up release-on-merge so we stop publishing by hand (np is local/interactive).

How it works once merged:

  • release-please watches main and keeps a "release PR" open that bumps the version based on the conventional commits since the last release. Merging that PR tags the release + creates the GitHub release (with generated notes).
  • publish runs only when a release is cut, and publishes to npm using OIDC trusted publishing — no NPM_TOKEN stored in the repo, and releases get provenance attestations.
  • pr-title keeps PR titles valid conventional commits, since we squash-merge and the title becomes the commit on main.

No committed CHANGELOG.mdskip-changelog is set, since the GitHub release already carries the notes.

Bootstrap is anchored to the v0.6.0 commit, so the first release PR it opens will be 0.6.1 (the already-merged wmic fix).

Requires two one-time settings before publishing works

  1. npm trusted publisher — npmjs.com → pidtree → Settings → Trusted Publisher → GitHub Actions: repo simonepri/pidtree, workflow release-please.yml.
  2. Allow Actions to open PRs — repo Settings → Actions → General → Workflow permissions → enable "Allow GitHub Actions to create and approve pull requests".

After merge: release-please opens the 0.6.1 release PR → you merge it → it publishes automatically.

On merge to main, release-please maintains a release PR (version bump
from conventional commits); merging it tags the release and publishes to
npm via OIDC trusted publishing. The committed changelog file is skipped
since the GitHub release already carries the notes. A pr-title check
keeps squash-merge titles conventional.
@simonepri
simonepri force-pushed the ci/release-automation branch from 8566b8d to 39b8f27 Compare June 8, 2026 09:38
@simonepri
simonepri merged commit 988c357 into main Jun 8, 2026
13 checks passed
@simonepri
simonepri deleted the ci/release-automation branch June 8, 2026 09:49
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