-
Notifications
You must be signed in to change notification settings - Fork 4
release process
Totem uses Changesets for versioning and changelog generation, combined with npm OIDC trusted publishing to ensure secure releases without long-lived npm tokens.
When you complete a feature or bug fix, you must create a changeset.
Important: The interactive Changeset CLI (pnpm changeset) often fails when operating through piped stdin (which happens frequently when AI agents run shell commands).
Workflow:
Write the changeset manually as a Markdown file in the .changeset/ directory.
Example .changeset/my-feature-name.md:
---
'@mmnto/cli': minor
'@mmnto/core': patch
---
Added support for JetBrains Junie auto-detection in `totem init`.(Use patch for bugfixes, minor for features, and major for breaking changes).
When preparing a release, never use bare pnpm version, as this resolves to pnpm's built-in versioning tool and bypasses Changesets.
Instead, always run the repository script:
pnpm run versionThis consumes the .changeset/ files, updates package.json versions across the workspace, and updates CHANGELOG.md files.
- Push your changesets to
main. - A GitHub Action automatically creates (or updates) a "Version Packages" PR.
- Review the PR to ensure the changelog generation looks correct.
- Merge the PR into
main. - The
release.ymlworkflow will automatically trigger, build the packages, and publish them to npm.
We publish to npm using OIDC (OpenID Connect) trusted publishing. This means GitHub Actions requests a short-lived token directly from npm, rather than storing a permanent NPM_TOKEN secret.
Why RELEASE_TOKEN?
Our GitHub organization restricts the default GITHUB_TOKEN from creating Pull Requests. Therefore, the automation requires a Personal Access Token (PAT) named RELEASE_TOKEN stored in GitHub Actions secrets to create the "Version Packages" PR.
To reduce release noise, aim to batch approximately ~3 PRs per release. Documentation updates should generally be batched and merged alongside or immediately prior to a release.
After the Version Packages PR merges and npm publishes:
-
Extract lessons:
totem extract <pr-numbers> --yesfor all PRs in the release -
Sync wiki: Copy
docs/wiki/*.mdto the GitHub Wiki repo and push -
Verify roadmap: Ensure
docs/wiki/roadmap.mdand the GitHub Wiki roadmap page are in sync - Update memory: Bump the version number in project memory (MEMORY.md)