Skip to content

ci(release): migrate to semantic-release with npm trusted publishing - #21

Merged
drichar merged 1 commit into
mainfrom
ci/trusted-publishing
May 28, 2026
Merged

ci(release): migrate to semantic-release with npm trusted publishing#21
drichar merged 1 commit into
mainfrom
ci/trusted-publishing

Conversation

@drichar

@drichar drichar commented May 28, 2026

Copy link
Copy Markdown
Contributor

Summary

Replaces the TanStack publisher (classic NPM_TOKEN auth) 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 into main that contains a feat/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: write for OIDC publishing with provenance (no npm token); runs pnpm run cinpm audit signaturessemantic-release
  • publishConfig.provenance: true on @txnlab/nfd-sdk
  • root ci / release scripts added
  • removed the old cipublish script, scripts/publish.js, and the push-to-main ci.yml
  • generated CHANGELOG.md added to Prettier ignore

pnpm 10

pnpm 10 ships an empty default public-hoist-pattern. The example apps import typescript-eslint/eslint plugins without declaring them and relied on the old hoisting, so:

  • restore *eslint* / *prettier* hoisting via root .npmrc
  • pin packageManager: pnpm@10.30.3, bump engines.pnpm to >=10
  • switch workflows to pnpm/action-setup@v4 (auto-detects from packageManager)

Test plan

Follow-up

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.
@drichar
drichar merged commit f7397c5 into main May 28, 2026
1 check passed
@drichar
drichar deleted the ci/trusted-publishing branch May 28, 2026 07:31
@txnlab-release-bot

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 1.1.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant