* Align issue ID matching with Linear matching logic * Bump package.json to 0.4.0
Linear Release
Automate release tracking in your CI/CD pipeline
Connect your deployments to Linear releases.
Automatically link issues to releases.
Important
Linear Release is in closed beta. Contact Linear support or your account manager to request access. APIs and commands may change.
Overview
Linear Release is a CLI tool that integrates your CI/CD pipeline with Linear's release management. It automatically:
- Scans commits for Linear issue identifiers (e.g.,
ENG-123) - Detects pull request references in commit messages
- Creates and updates releases in Linear
- Tracks deployment stages (staging, production, etc.)
Installation
Download the pre-built binary for your platform from the releases page.
# Linux (x64)
curl -L https://github.com/linear/linear-release/releases/latest/download/linear-release-linux-x64 -o linear-release
# macOS (Apple Silicon)
curl -L https://github.com/linear/linear-release/releases/latest/download/linear-release-darwin-arm64 -o linear-release
# macOS (Intel)
curl -L https://github.com/linear/linear-release/releases/latest/download/linear-release-darwin-x64 -o linear-release
chmod +x linear-release
Quick Start
GitHub Actions
Use the official Linear Release Action for the simplest setup:
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: linear/linear-release-action@v0
with:
access_key: ${{ secrets.LINEAR_ACCESS_KEY }}
Other CI platforms
Download the CLI binary and run it directly:
# Download
curl -L https://github.com/linear/linear-release/releases/latest/download/linear-release-linux-x64 -o linear-release
chmod +x linear-release
# Run
LINEAR_ACCESS_KEY=<your-key> ./linear-release sync
Commands
sync
Creates a release or adds issues to the current release. This is the default command.
# Name and version default to the short commit hash (e.g., "a1b2c3d")
linear-release sync
# Specify custom name and version
linear-release sync --name="Release 1.2.0" --release-version="1.2.0"
complete
Marks a release as complete. Only applicable to scheduled pipelines, as continuous pipelines create releases in the completed stage automatically.
# Completes the most recent started release
linear-release complete
# Completes the release with the specified version
linear-release complete --release-version="1.2.0"
update
Updates a release's deployment stage. Only applicable to scheduled pipelines, as continuous pipelines create releases in the completed stage automatically.
# Updates the latest started release (or planned if no started release exists)
linear-release update --stage="in review"
# Updates the release with the specified version
linear-release update --stage="in review" --release-version="1.2.0"
Configuration
Environment Variables
| Variable | Required | Description |
|---|---|---|
LINEAR_ACCESS_KEY |
Yes | Pipeline access key from Linear |
CLI Options
| Option | Commands | Description |
|---|---|---|
--name |
sync |
Custom release name. Defaults to short commit hash. |
--release-version |
sync, complete, update |
Release version identifier. For sync, defaults to short commit hash. For complete and update, if omitted, targets the most recent started release. |
--stage |
update |
Target deployment stage (required for update) |
--include-paths |
sync |
Filter commits by changed file paths |
--json |
sync, complete, update |
Output result as JSON |
JSON Output
Use --json to get structured output for scripting.
linear-release sync --json
# => {"release":{"id":"...","name":"Release 1.2.0","version":"1.2.0","url":"https://linear.app/..."}}
When no release is created (e.g. no commits found), --json outputs {"release":null}.
Path Filtering
Use --include-paths to only include commits that modify specific files. This is useful for monorepos.
# Only include commits affecting the mobile app
linear-release sync --include-paths="apps/mobile/**"
# Multiple patterns
linear-release sync --include-paths="apps/mobile/**,packages/shared/**"
Patterns use Git pathspec glob syntax. Paths are relative to the repository root.
Path patterns can also be configured in your pipeline settings in Linear. If both are set, the CLI --include-paths option takes precedence.
How It Works
- Fetches the latest release from your Linear pipeline to determine the commit range
- Scans commits between the last release and the current commit
- Extracts issue identifiers from branch names and commit messages (e.g.,
feat/ENG-123-add-feature) - Detects pull request numbers from commit messages (e.g.,
Merge pull request #42) - Syncs to Linear creating or updating the release with linked issues
License
Licensed under the MIT License.