| name | release-packages |
| description | Version and publish @decentralchain/* packages. USE WHEN: user asks about releasing, publishing, versioning, changelogs, or npm publishing. Covers the nx release workflow with independent versioning and conventional commits. |
Release Packages
Version and publish @decentralchain/* packages using Nx Release with independent versioning.
How Versioning Works
- Independent versioning — each package has its own version, bumped based on conventional commits that touch it.
- Conventional commits drive versions:
fix(crypto): ... → patch bump for @decentralchain/crypto
feat(signer): ... → minor bump for @decentralchain/signer
feat(types)!: ... or BREAKING CHANGE: → major bump
- Only packages with relevant commits since their last release get bumped.
Release Commands
Dry Run (Preview)
Always dry-run first to see what would change:
pnpm nx release --dry-run
This shows:
- Which packages will be bumped
- What the new versions will be
- Changelog entries that would be generated
Full Release
pnpm nx release
This runs three stages:
- Version — bumps
package.json versions based on conventional commits
- Changelog — generates per-project
CHANGELOG.md + workspace CHANGELOG.md
- Publish — publishes to npm with provenance signing
Release Specific Packages
pnpm nx release --projects=@decentralchain/crypto,@decentralchain/types
First Release (no previous tags)
pnpm nx release --first-release
Uses fallbackCurrentVersionResolver: "disk" to read current versions from package.json.
Configuration
Release config lives in nx.json under the release key:
{
"release": {
"projects": ["packages/sdk/*"],
"projectsRelationship": "independent",
"version": {
"conventionalCommits": true,
"generatorOptions": {
"fallbackCurrentVersionResolver": "disk"
}
},
"changelog": {
"projectChangelogs": true,
"workspaceChangelog": {
"createRelease": "github",
"file": "CHANGELOG.md"
}
}
}
}
Commit Message Format
type(scope): description
# scope = package name without @decentralchain/ prefix
# Examples:
feat(crypto): add ed25519 key derivation
fix(transactions): correct serialization of invoke-script
chore(bignumber): update dependencies
docs(signer): add usage examples to README
Valid types: feat, fix, chore, docs, refactor, perf, test, ci, build, style.
Pre-Release Checklist
Before releasing:
git status
pnpm nx run-many -t build
pnpm nx run-many -t test
pnpm nx run-many -t biome-lint
pnpm nx run-many -t typecheck
node scripts/check-boundaries.mjs
pnpm nx release --dry-run
Notes
workspace:* dependencies are replaced with exact versions at publish time by pnpm.
- GitHub releases are created automatically for workspace-level changelog.
- npm provenance signing is enabled (requires CI with OIDC support or
--provenance flag).