Skip to content

chore: automate npm releases with release-it and Trusted Publishing - #173

Merged
Naturalclar merged 3 commits into
masterfrom
chore/release-it
Nov 24, 2026
Merged

Naturalclar merged 3 commits into
masterfrom
chore/release-it

Conversation

@Naturalclar

Copy link
Copy Markdown
Member

Closes #172

Automates npm releases with release-it, mirroring react-native-menu/menu.

Changes

  • package.json
    • add release-it + @release-it/conventional-changelog (conventionalcommits preset) and a release script
    • release-it config: chore: release ${version} commit, v${version} tag (matches existing tags), GitHub release, npm.skipChecks (no long-lived token under OIDC)
    • repository / homepage / bugs now point at react-native-progress-view/progress-view. npm rejects a provenance-signed publish whose repository.url doesn't match the publishing repo.
  • .github/workflows/release.yml (new): runs after Build succeeds on a push to master, and publishes via npm Trusted Publishing (OIDC, npm ≥ 11.5.1, provenance attached, no NPM_TOKEN). It skips when master moved past the validated commit, when there's no releasable conventional commit, and on its own chore: release commit.
  • ci.yml: Build also runs on push to master and on workflow_dispatch, so the release workflow has a run to follow.

Differences from menu

Verified locally

  • release-it --ci --dry-run → No new version to release
  • release-it patch --ci --dry-run → 1.5.0...1.5.1, npm publish --dry-run OK
  • yarn install --pure-lockfile leaves the tree clean, yarn lint passes, actionlint clean for release.yml

Before the first release (outside this PR)

  • Branch protection: master requires 1 approving review, so github-actions[bot] pushing the release commit and tag will be rejected. Relax the rule or add a bypass for GitHub Actions.
  • PR titles (squash commits) need to follow Conventional Commits from now on.

🤖 Generated with Claude Code

Naturalclar and others added 3 commits November 24, 2026 14:31
Closes #172

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
release-it 21 requires Node ^22.22.2, which Yarn 1 enforces as a hard
error. It only runs in CI, so don't fail contributor installs on it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Naturalclar
Naturalclar merged commit defe08b into master Nov 24, 2026
6 checks passed
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.

Automate npm releases with release-it and Trusted Publishing

1 participant