Versioning
Habits uses GitHub Releases to publish to npm with Trusted Publisher (OIDC).
Release Tags
| GitHub Action | NPM Tag | Version | Install |
|---|---|---|---|
| Create release (draft/prerelease) | @rc | x.y.z-rc.{build} | npx habits@rc |
| Publish release | @latest | x.y.z | npx habits |
How to Release
Release Candidate (RC)
- RCs are created when anew release is drafted on Github from Releases → Draft a new release
- Create tag (e.g.,
v1.0.0) - Check "Set as a pre-release" or save as draft
- Click Save draft or Publish as pre-release
- CI publishes to npm as
habits@rc
Test: npx habits@rc
Stable Release
- Go to GitHub → Releases
- Find your draft/pre-release
- Click Edit → Publish release
- CI publishes to npm as
habits@latest
Install: npx habits or npx habits@latest
Manual Publish
bash
# Bump version
cd packages/habits/app
npm version patch --no-git-tag-version
# Build and publish
pnpm nx publish habitsSetup: Trusted Publisher (OIDC)
No NPM_TOKEN needed! Configure trusted publishing on npm:
- Go to npmjs.com → Package
habits→ Settings → Trusted Publishers - Click Add trusted publisher
- Configure:
- Repository owner:
codenteam - Repository name:
habits - Workflow filename:
npm-publish.yml - Environment: (leave empty)
- Repository owner:
- Save
This allows GitHub Actions to publish without storing secrets.
