|
| 1 | +<p align="center"> |
| 2 | + <a href="https://linear.app" target="_blank" rel="noopener noreferrer"> |
| 3 | + <img width="64" src="https://raw.githubusercontent.com/linear/linear/master/docs/logo.svg" alt="Linear logo"> |
| 4 | + </a> |
| 5 | +</p> |
| 6 | +<h1 align="center"> |
| 7 | + Linear Release Action |
| 8 | +</h1> |
| 9 | +<h3 align="center"> |
| 10 | + GitHub Action for syncing deployments with Linear releases |
| 11 | +</h3> |
| 12 | +<p align="center"> |
| 13 | + Connect your deployments to Linear releases.<br/> |
| 14 | + Automatically link issues to releases. |
| 15 | +</p> |
| 16 | +<p align="center"> |
| 17 | + <a href="https://github.com/linear/linear-release-action/actions/workflows/ci.yml"><img src="https://github.com/linear/linear-release-action/actions/workflows/ci.yml/badge.svg" alt="CI"></a> |
| 18 | + <a href="https://github.com/linear/linear-release-action/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-MIT-blue.svg" alt="Linear Release Action is released under the MIT license."></a> |
| 19 | +</p> |
| 20 | + |
| 21 | +> [!NOTE] |
| 22 | +> This project is currently in beta and requires enrollment to use. If you're interested in trying it out or need assistance, please contact [Linear support](https://linear.app/contact) or your account manager. APIs and commands may change in future releases. |
| 23 | +
|
| 24 | +## Overview |
| 25 | + |
| 26 | +This action wraps the [Linear Release CLI](https://github.com/linear/linear-release) to integrate your CI/CD pipeline with [Linear's release management](https://linear.app/docs/releases). It automatically scans commits for Linear issue identifiers, detects pull request references, and creates or updates releases in Linear. |
| 27 | + |
| 28 | +## Quick Start |
| 29 | + |
| 30 | +```yaml |
| 31 | +permissions: |
| 32 | + contents: read |
| 33 | + |
| 34 | +steps: |
| 35 | + - uses: actions/checkout@v4 |
| 36 | + with: |
| 37 | + fetch-depth: 0 # Required for commit history |
| 38 | + |
| 39 | + - uses: linear/linear-release-action@v0.1.0 |
| 40 | + with: |
| 41 | + access_key: ${{ secrets.LINEAR_ACCESS_KEY }} |
| 42 | +``` |
| 43 | +
|
| 44 | +## Inputs |
| 45 | +
|
| 46 | +| Input | Required | Default | Description | |
| 47 | +| --- | --- | --- | --- | |
| 48 | +| `access_key` | Yes | | Linear pipeline access key for authentication | |
| 49 | +| `command` | No | `sync` | Command to run: `sync`, `complete`, or `update` | |
| 50 | +| `name` | No | | Custom release name (only used with `sync` command) | |
| 51 | +| `version` | No | | Release version identifier | |
| 52 | +| `stage` | No | | Deployment stage such as `staging` or `production` (required for `update`) | |
| 53 | +| `include_paths` | No | | Filter commits by file paths (comma-separated globs for monorepos) | |
| 54 | +| `cli_version` | No | `latest` | Linear Release CLI version tag to install | |
| 55 | + |
| 56 | +## Commands |
| 57 | + |
| 58 | +### sync |
| 59 | + |
| 60 | +Creates or updates a release by scanning commits for Linear issue identifiers. |
| 61 | + |
| 62 | +```yaml |
| 63 | +- uses: linear/linear-release-action@v0.1.0 |
| 64 | + with: |
| 65 | + access_key: ${{ secrets.LINEAR_ACCESS_KEY }} |
| 66 | +``` |
| 67 | + |
| 68 | +### complete |
| 69 | + |
| 70 | +Marks the current release as complete. |
| 71 | + |
| 72 | +```yaml |
| 73 | +- uses: linear/linear-release-action@v0.1.0 |
| 74 | + with: |
| 75 | + access_key: ${{ secrets.LINEAR_ACCESS_KEY }} |
| 76 | + command: complete |
| 77 | +``` |
| 78 | + |
| 79 | +### update |
| 80 | + |
| 81 | +Updates the deployment stage of the current release. |
| 82 | + |
| 83 | +```yaml |
| 84 | +- uses: linear/linear-release-action@v0.1.0 |
| 85 | + with: |
| 86 | + access_key: ${{ secrets.LINEAR_ACCESS_KEY }} |
| 87 | + command: update |
| 88 | + stage: staging |
| 89 | +``` |
| 90 | + |
| 91 | +### Monorepo filtering |
| 92 | + |
| 93 | +Filter commits by file paths to track releases for specific packages: |
| 94 | + |
| 95 | +```yaml |
| 96 | +- uses: linear/linear-release-action@v0.1.0 |
| 97 | + with: |
| 98 | + access_key: ${{ secrets.LINEAR_ACCESS_KEY }} |
| 99 | + include_paths: apps/web/**,packages/shared/** |
| 100 | +``` |
| 101 | + |
| 102 | +## Troubleshooting |
| 103 | + |
| 104 | +**"Unsupported OS" or "Unsupported arch" error** |
| 105 | + |
| 106 | +The action only supports Linux x86_64 and macOS x86_64/arm64 runners. Windows is not supported. |
| 107 | + |
| 108 | +**"access_key input is required" error** |
| 109 | + |
| 110 | +Ensure you've set the `access_key` input with your Linear pipeline access key stored in GitHub Secrets. |
| 111 | + |
| 112 | +**Issues not being linked** |
| 113 | + |
| 114 | +Make sure your commits contain Linear issue identifiers (e.g., `ENG-123`) and that `actions/checkout` uses `fetch-depth: 0`. |
| 115 | + |
| 116 | +## License |
| 117 | + |
| 118 | +MIT - see [LICENSE](LICENSE) |
0 commit comments