Skip to content

Commit fbf0176

Browse files
authored
Ensure name is properly used when creating scheduled release (#8)
1 parent f64cdc6 commit fbf0176

2 files changed

Lines changed: 19 additions & 1 deletion

File tree

README.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ steps:
4747
| --------------- | -------- | -------- | -------------------------------------------------------------------------- |
4848
| `access_key` | Yes | | Linear pipeline access key for authentication |
4949
| `command` | No | `sync` | Command to run: `sync`, `complete`, or `update` |
50-
| `name` | No | | Custom release name (only used with `sync` command) |
50+
| `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`. |
5151
| `version` | No | | Release version identifier |
5252
| `stage` | No | | Deployment stage such as `staging` or `production` (required for `update`) |
5353
| `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
119119
stage: staging
120120
```
121121

122+
### Command targeting
123+
124+
| Command | With `version` | Without `version` |
125+
| ------- | -------------- | ----------------- |
126+
| `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. |
127+
| `update` | Updates that exact release version | Updates latest started release, or latest planned release if no started release exists |
128+
| `complete` | Completes that exact release version | Completes latest started release |
129+
130+
For scheduled pipelines, prefer always passing `version` in CI, especially when releases overlap.
131+
122132
### Monorepo filtering
123133

124134
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
144154

145155
Make sure your commits contain Linear issue identifiers (e.g., `ENG-123`) and that `actions/checkout` uses `fetch-depth: 0`.
146156

157+
**`name` is ignored on non-sync commands**
158+
159+
If `name` is provided with `command: update` or `command: complete`, the action prints a warning and continues. Use `name` with `command: sync` only.
160+
147161
## License
148162

149163
MIT - see [LICENSE](LICENSE)

run.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@ if [[ "$COMMAND" == "update" && -z "${INPUT_STAGE:-}" ]]; then
3939
exit 1
4040
fi
4141

42+
if [[ "$COMMAND" != "sync" && -n "${INPUT_NAME:-}" ]]; then
43+
echo "::warning::name input is ignored when command is '$COMMAND' (only used with 'sync')"
44+
fi
45+
4246
args=()
4347
[[ -n "${INPUT_NAME:-}" ]] && args+=("--name=${INPUT_NAME}")
4448
[[ -n "${INPUT_VERSION:-}" ]] && args+=("--release-version=${INPUT_VERSION}")

0 commit comments

Comments
 (0)