mirror of
https://github.com/linear/linear-release.git
synced 2026-09-14 20:00:10 +08:00
GitLab CI — Continuous Pipeline
Every deployment creates a completed release automatically.
When to use
Use this when your team ships continuously — every push to the default branch is a deploy, and each deploy should be tracked as its own release in Linear.
How it works
On every push to the default branch, the job downloads the Linear Release CLI and runs sync. This creates a new release from the commits since the last release and immediately marks it as complete.
Setup
- Create a release pipeline in Linear (Settings → Releases) and grab the access key.
- Add
LINEAR_ACCESS_KEYas a CI/CD variable in GitLab (Settings → CI/CD → Variables). - Copy the contents of
.gitlab-ci.ymlinto your.gitlab-ci.yml(or merge with your existing config).
Customization
- Branch rules: The workflow uses GitLab's predefined
$CI_DEFAULT_BRANCHvariable, which automatically matches your repository's default branch. To target a different branch, replace$CI_DEFAULT_BRANCHin the rule expression with a hardcoded branch name (e.g.if: $CI_COMMIT_BRANCH == "production"). - Monorepo path filters: Add
--include-pathsto thesynccommand to scope the release to specific directories.