Appearance
Release Process
Radar releases are automated with semantic-release. Maintainers do not manually edit the package version.
Release Channels
mainpublishes stable releases to npm.nextpublishes prereleases on thenextdist-tag.betapublishes prereleases on thebetadist-tag.
Commit Format
Use Conventional Commits so semantic-release can calculate the next version:
bash
feat: add new delegation guardrail
fix: preserve diagnostics for MCP responses
docs: update installation guideBreaking changes use ! or a BREAKING CHANGE: footer:
bash
feat!: change write tool overwrite behaviorHusky runs commitlint in the commit-msg hook to catch invalid commit messages locally.
GitHub Actions
The release workflow runs on pushes to release branches. It:
- Installs dependencies from
pnpm-lock.yaml. - Audits dependencies.
- Runs the full project check.
- Builds the package.
- Runs semantic-release.
semantic-release then:
- Calculates the next version from commit history.
- Updates
CHANGELOG.md. - Updates the published package version.
- Publishes
@contextrail/radarto npm as a public package. - Commits release metadata back to the release branch.
- Creates a GitHub Release with generated release notes.
- Attaches the generated npm tarball.
Radar disables semantic-release GitHub issue and PR comments. The release bot only needs to push release metadata, create tags, create GitHub Releases, and upload release assets.
Required Repository Setup
Before the first release:
- Create the GitHub repository at
contextrail/radar, or update package metadata and the Pages custom domain if the final repository name or docs domain differs. - Configure npm trusted publishing for the package and the GitHub Actions release workflow.
- Create a
releaseGitHub environment. - Add
RELEASE_APP_IDas a variable on thereleaseenvironment. - Add
RELEASE_APP_PRIVATE_KEYas a secret on thereleaseenvironment. - Allow the release GitHub App to bypass the protected release branches in the branch ruleset.
- Ensure GitHub Actions has permission to create releases.
- Ensure the package name
@contextrail/radaris available or already owned by the organization.
The workflow includes id-token: write so npm can publish with provenance through trusted publishing. Do not add a long-lived npm token unless trusted publishing is unavailable and the release workflow is updated intentionally.
Release Bot
Release commits use a short-lived token minted from a dedicated GitHub App.
Create a GitHub App for releases and install it only on contextrail/radar.
The app needs repository permissions:
- Repository contents: read and write.
- Metadata: read.
In GitHub:
- Create a GitHub App for release automation.
- Install the app on
contextrail/radar. - Go to Settings > Environments and create
release. - Add
RELEASE_APP_IDas an environment variable. Use the app's numeric App ID, not the client ID. - Generate a private key for the app and add it as the
RELEASE_APP_PRIVATE_KEYenvironment secret. - If you changed the app permissions after installing it, approve or reinstall the app so the installation receives the updated permissions.
- Go to Settings > Rules > Rulesets.
- Add the release GitHub App to the bypass list for
main,next, andbeta. - If branch protection uses a separate Restrict who can push to matching branches rule, add the release GitHub App there too.
- Require approval for the
releaseenvironment if you want a human gate before publishing.
In npm trusted publishing, set the environment to release because the workflow job uses the release environment.