Quick Start
Craft releases happen in two steps:
craft preparecreates a release branch, bumps versions, checks or generates the changelog, and pushes the branch. Your CI builds release artifacts from it.craft publishwaits for CI to pass, downloads those artifacts, and publishes them to every configured target, then merges the release branch back.
See Release Workflow for what happens at each step.
Installation
Section titled “Installation”Install the CLI with one command (macOS, Linux, or Windows x64 via Git Bash):
curl -fsSL https://craft.sentry.dev/install | bashSee Installation for Homebrew, standalone binaries, npm, updates, and shell completion. In GitHub Actions, the Craft Action installs Craft for you.
Craft talks to GitHub for almost everything, so export a GITHUB_TOKEN with
repo scope before running it locally. See CLI → GitHub token.
Integrate your project
Section titled “Integrate your project”-
Build release branches in CI. Make sure your build workflow runs on release branches:
on:push:branches:- 'release/**' -
Upload build artifacts named after the commit SHA, which is what the default GitHub artifact provider looks for:
- name: Archive Artifactsuses: actions/upload-artifact@v4with:name: ${{ github.sha }}path: |${{ github.workspace }}/*.tgz -
Add
.craft.ymlto the repository root with your targets:minVersion: '2.21.0'changelog:policy: autotargets:- name: github- name: npmSee the configuration reference for every option.
-
Set up version bumping. With
minVersion: '2.21.0'or later, Craft bumps versions automatically based on your targets. Otherwise, addscripts/bump-version.shor set a custompreReleaseCommand. -
Provide credentials for your targets as environment variables (for example
NPM_TOKEN). Each target page lists what it needs.
Ship a release
Section titled “Ship a release”Let’s release version 1.2.3:
craft prepare 1.2.3This creates the release/1.2.3 branch, bumps versions, commits the changes,
and pushes the branch. CI builds and uploads the artifacts.
craft publish 1.2.3This finds the release branch, waits for CI to pass, downloads the artifacts, publishes them to your targets (for example GitHub and npm), and merges the branch back into your default branch.
You can let Craft choose the version from your commit history instead:
craft prepare auto # or major, minor, patchOr do both steps at once with craft prepare 1.2.3 --publish.