diff --git a/README.md b/README.md index ced125a..d6862f3 100644 --- a/README.md +++ b/README.md @@ -63,6 +63,7 @@ Once installed, run it from your AI agent with `/linear-release-setup` (or just | `stage` | No | | Deployment stage such as `staging` or `production` (required for `update`) | | `include_paths` | No | | Filter commits by file paths (comma-separated globs for monorepos) | | `base_ref` | No | | Override the `sync` scan base. Exclusive: scans `..HEAD` | +| `links` | No | | Links to attach to the targeted release, one per line. Each value must be either an absolute URL or `Label=URL`. | | `log_level` | No | | Log verbosity: `quiet` or `verbose`. Omit for default output. | | `timeout` | No | `60` | Maximum time in seconds to wait for the command to complete | | `cli_version` | No | `v0.12.0` | Linear Release CLI version to install | @@ -168,6 +169,19 @@ The base ref is exclusive: Linear Release scans `..HEAD`, matching Git When `base_ref` is provided, it overrides automatic base selection for that run. After sync, current `HEAD` is stored as the future release baseline. Choosing an older or newer base can reattach or skip commits, so use this only when you intentionally want to own the scan range. +### Release links + +`links` attaches external URLs to the release — a GitHub release page, a CI run, a deployment dashboard. One link per line, as either an absolute URL or `Label=URL`. When the label is omitted, Linear derives it from the URL (e.g. `https://github.com/...` → "GitHub"). + +```yaml +- uses: linear/linear-release-action@v0 + with: + access_key: ${{ secrets.LINEAR_ACCESS_KEY }} + links: | + https://github.com/acme/app/releases/tag/v1.2.0 + Deploy dashboard=https://deploys.example.com/v1.2.0 +``` + ## Versioning Each release of this action defaults to a specific [Linear Release CLI](https://github.com/linear/linear-release) version. Pinning the action — whether by tag (`@v0`) or commit SHA — also pins the CLI. Set `cli_version` to override. diff --git a/action.yml b/action.yml index 7554055..01a96b8 100644 --- a/action.yml +++ b/action.yml @@ -32,6 +32,9 @@ inputs: base_ref: description: "Override the sync scan base. Exclusive: scans ..HEAD." required: false + links: + description: Links to attach to the targeted release. Use one link per line. Each link must be either an absolute URL or "Label=URL". + required: false log_level: description: Log verbosity. Use "quiet" for errors only or "verbose" for detailed progress. Omit for default output. required: false @@ -79,6 +82,7 @@ runs: INPUT_STAGE: ${{ inputs.stage }} INPUT_INCLUDE_PATHS: ${{ inputs.include_paths }} INPUT_BASE_REF: ${{ inputs.base_ref }} + INPUT_LINKS: ${{ inputs.links }} INPUT_LOG_LEVEL: ${{ inputs.log_level }} INPUT_TIMEOUT: ${{ inputs.timeout }} diff --git a/run.sh b/run.sh index 950dede..ad770ec 100644 --- a/run.sh +++ b/run.sh @@ -50,6 +50,12 @@ args=() [[ -n "${INPUT_STAGE:-}" ]] && args+=("--stage=${INPUT_STAGE}") [[ -n "${INPUT_INCLUDE_PATHS:-}" ]] && args+=("--include-paths=${INPUT_INCLUDE_PATHS}") [[ -n "${INPUT_BASE_REF:-}" ]] && args+=("--base-ref=${INPUT_BASE_REF}") +if [[ -n "${INPUT_LINKS:-}" ]]; then + while IFS= read -r link || [[ -n "$link" ]]; do + [[ "$link" =~ ^[[:space:]]*$ ]] && continue + args+=("--link=${link}") + done <<<"${INPUT_LINKS}" +fi [[ -n "${INPUT_TIMEOUT:-}" ]] && args+=("--timeout=${INPUT_TIMEOUT}") if [[ -n "${INPUT_LOG_LEVEL:-}" ]]; then