ci(release): migrate to semantic-release with npm trusted publishing - #21
Merged
Conversation
Replace the TanStack publisher (NPM_TOKEN auth) with semantic-release and OIDC trusted publishing: - add .releaserc.js (monorepo, pkgRoot packages/sdk) - add release.yml on push to main using the TxnLab Release Bot app token and id-token: write for OIDC provenance publishing (no npm token) - set publishConfig.provenance on @txnlab/nfd-sdk - add root ci/release scripts; drop cipublish and scripts/publish.js - ignore generated CHANGELOG.md in prettier Also migrate to pnpm 10 (matching local tooling): pnpm 10 ships an empty default public-hoist-pattern, so restore *eslint*/*prettier* hoisting via .npmrc, pin packageManager, and bump engines + workflows accordingly.
Contributor
|
🎉 This PR is included in version 1.1.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
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.
Summary
Replaces the TanStack publisher (classic
NPM_TOKENauth) with semantic-release + OIDC trusted publishing, matching the current TxnLab standard. Also migrates the repo to pnpm 10.This PR publishes nothing on merge — the only commit is
ci:, so semantic-release reports "no release". The next merge intomainthat contains afeat/fix(i.e. PR #20) will publish via the new pipeline.Release pipeline
.releaserc.js— semantic-release, monorepo (pkgRoot: packages/sdk),tagFormat: v${version}.github/workflows/release.yml— push-to-main; TxnLab Release Bot app token;id-token: writefor OIDC publishing with provenance (no npm token); runspnpm run ci→npm audit signatures→semantic-releasepublishConfig.provenance: trueon@txnlab/nfd-sdkci/releasescripts addedcipublishscript,scripts/publish.js, and the push-to-mainci.ymlCHANGELOG.mdadded to Prettier ignorepnpm 10
pnpm 10 ships an empty default
public-hoist-pattern. The example apps importtypescript-eslint/eslint plugins without declaring them and relied on the old hoisting, so:*eslint*/*prettier*hoisting via root.npmrcpackageManager: pnpm@10.30.3, bumpengines.pnpmto>=10pnpm/action-setup@v4(auto-detects frompackageManager)Test plan
pnpm run cipasses locally (lint, typecheck, 113 tests, SDK + 9 example builds)Releasejob on this PR's eventual merge reports "no new version is released" and publishes nothing@txnlab/nfd-sdk@1.1.0published via OIDC with provenance,v1.1.0tag + GitHub release createdFollow-up
RELEASE_BOT_APP_ID/RELEASE_BOT_PRIVATE_KEYare configured.feat:commit (squash title or merge commit) so the minor bump triggers.