This repository uses semantic-release + GitHub Actions to build, test, tag, create GitHub releases, and publish to npm.
The release workflow is .github/workflows/release.yml.
- Tests run first (unit + integration against Camunda 8 via Docker Compose). This job is copied from the test workflow so release runs are gated on the same checks.
- If tests pass, the workflow runs
npx semantic-release. semantic-release:- determines the next version from commit messages (Conventional Commits)
- generates release notes
- builds the package (
npm run build) - publishes to npm
- creates a GitHub release + comments on included issues/PRs
Release configuration lives in .releaserc.json.
We publish two “streams”:
-
Alpha (prerelease): from branch
main- published to npm under the
alphadist-tag (so users install vianpm i @camunda8/cli@alpha) - versions look like
2.0.0-alpha.2
- published to npm under the
-
Stable (latest): from branch
release- published to npm under the default
latestdist-tag - versions look like
2.0.0
- published to npm under the default
This is controlled by the branches setting in .releaserc.json.
The release workflow is intended to publish using GitHub Actions OIDC (no long-lived npm token stored in GitHub).
- The workflow requests
id-token: writepermissions. - npm must be configured to trust this GitHub repository for OIDC publishing.
- The publish step uses provenance (
--provenance/NPM_CONFIG_PROVENANCE=true).
npm decides what goes into the published tarball.
In this repo, the files field in package.json limits the published contents to:
dist/README.mdLICENSE
(Plus package.json itself and npm’s standard always-included metadata files.)
semantic-release only creates a new release when there are commits that imply a version bump.
Examples:
fix: ...→ patchfeat: ...→ minorfeat!: ...orBREAKING CHANGE: ...→ major
If you merge commits that don’t follow Conventional Commits, semantic-release may do no release.
This is the normal day-to-day prerelease flow.
- Ensure your changes are merged to
mainwith Conventional Commit messages. - Push to
main(merging a PR tomainis enough). - Verify GitHub Actions:
- Go to Actions → Release workflow
- Confirm the run triggered on
maincompleted successfully
- Verify artifacts:
- npm: check that a new version exists under the alpha dist-tag
- Example install:
npm i -g @camunda8/cli@alpha
- Example install:
- GitHub: confirm a new release + tag were created (tag format is
vX.Y.Z[-prerelease])
- npm: check that a new version exists under the alpha dist-tag
If the workflow says “no release”:
- Confirm at least one commit since the last tag uses
fix:,feat:, or contains a breaking change marker.
If npm OIDC requires the package to already exist, you can do a one-time manual alpha publish to create it.
- Update version + tag:
git checkout main && git pull --ff-onlynpm version 2.0.0-alpha.1 -m "chore(release): %s"
- Build and publish:
npm cinpm run buildnpm publish --tag alpha --access public
- Push the commit + tag so semantic-release has the correct baseline:
git push origin main --follow-tags
After this bootstrap, prefer the automated workflow for subsequent alpha releases.
Stable releases are cut by updating the release branch.
- Decide what goes into the stable release.
- Typical approach: fast-forward
releaseto the desired commit frommain.
- Typical approach: fast-forward
- Update
releaselocally:git fetch origingit checkout releasegit pull --ff-only- Merge the desired commits from
main:- Option A (recommended when releasing everything currently in
main):git merge --ff-only origin/main
- Option B (selective):
git cherry-pick <sha> ...
- Option A (recommended when releasing everything currently in
- Push
release:git push origin release
- Verify GitHub Actions:
- Go to Actions → Release workflow
- Confirm the run triggered on
releasecompleted successfully
- Verify artifacts:
- npm: the new version should be on the latest dist-tag (default)
- Example install:
npm i -g @camunda8/cli
- Example install:
- GitHub: confirm a release + tag were created
- npm: the new version should be on the latest dist-tag (default)
If you need to re-run without changing commits, you can use Actions → Release → Run workflow (workflow_dispatch), but note that semantic-release will still only publish if there are release-worthy commits since the last tag.