From 7b873e512694449a759e4004255ab674926a28b5 Mon Sep 17 00:00:00 2001 From: Romain Cascino Date: Mon, 23 Feb 2026 08:36:34 +0000 Subject: [PATCH] Ensure name is properly used when creating scheduled release --- README.md | 16 +++++++++++++++- run.sh | 4 ++++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index b31c3a9..0ba4666 100644 --- a/README.md +++ b/README.md @@ -47,7 +47,7 @@ steps: | --------------- | -------- | -------- | -------------------------------------------------------------------------- | | `access_key` | Yes | | Linear pipeline access key for authentication | | `command` | No | `sync` | Command to run: `sync`, `complete`, or `update` | -| `name` | No | | Custom release name (only used with `sync` command) | +| `name` | No | | Custom release name for `sync`. Continuous pipelines: used on create. Scheduled pipelines: used only when `sync` creates a release; existing release names are preserved. Ignored (with warning) for `complete` and `update`. | | `version` | No | | Release version identifier | | `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) | @@ -119,6 +119,16 @@ Updates the deployment stage of the current release. Only applicable to schedule stage: staging ``` +### Command targeting + +| Command | With `version` | Without `version` | +| ------- | -------------- | ----------------- | +| `sync` | Targets matching version or creates that version | Continuous pipelines create a release with short SHA name/version. Scheduled pipelines use current started/planned flow. | +| `update` | Updates that exact release version | Updates latest started release, or latest planned release if no started release exists | +| `complete` | Completes that exact release version | Completes latest started release | + +For scheduled pipelines, prefer always passing `version` in CI, especially when releases overlap. + ### Monorepo filtering Filter commits by file paths to track releases for specific packages: @@ -144,6 +154,10 @@ Ensure you've set the `access_key` input with your Linear pipeline access key st Make sure your commits contain Linear issue identifiers (e.g., `ENG-123`) and that `actions/checkout` uses `fetch-depth: 0`. +**`name` is ignored on non-sync commands** + +If `name` is provided with `command: update` or `command: complete`, the action prints a warning and continues. Use `name` with `command: sync` only. + ## License MIT - see [LICENSE](LICENSE) diff --git a/run.sh b/run.sh index fad86ed..e67eb65 100644 --- a/run.sh +++ b/run.sh @@ -39,6 +39,10 @@ if [[ "$COMMAND" == "update" && -z "${INPUT_STAGE:-}" ]]; then exit 1 fi +if [[ "$COMMAND" != "sync" && -n "${INPUT_NAME:-}" ]]; then + echo "::warning::name input is ignored when command is '$COMMAND' (only used with 'sync')" +fi + args=() [[ -n "${INPUT_NAME:-}" ]] && args+=("--name=${INPUT_NAME}") [[ -n "${INPUT_VERSION:-}" ]] && args+=("--release-version=${INPUT_VERSION}")