Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -168,9 +168,19 @@ jobs:
draft: false
prerelease: false

label-release:
name: Label release with version
needs: release
uses: ./.github/workflows/run-linear-release.yml
with:
action: sync
name: Release ${{ needs.release.outputs.version_number }}
version: ${{ needs.release.outputs.tag_name }}
secrets: inherit

complete-release:
name: Complete release
needs: release
needs: label-release
uses: ./.github/workflows/run-linear-release.yml
with:
action: complete
Expand Down
19 changes: 14 additions & 5 deletions .github/workflows/run-linear-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ on:
required: true
type: string
name:
description: "Release name (used by complete)"
description: "Release name"
required: false
type: string
version:
description: "Release version (used by complete)"
description: "Release version"
required: false
type: string

Expand All @@ -26,11 +26,11 @@ on:
- sync
- complete
name:
description: "Release name (used by complete)"
description: "Release name"
required: false
type: string
version:
description: "Release version (used by complete)"
description: "Release version"
required: false
type: string

Expand All @@ -55,9 +55,18 @@ jobs:
- name: Sync issues
env:
LINEAR_ACCESS_KEY: ${{ secrets.LINEAR_RELEASE_MANAGEMENT_ACCESS_KEY }}
RELEASE_NAME: ${{ inputs.name }}
RELEASE_VERSION: ${{ inputs.version }}
run: |
chmod +x linear-release
./linear-release sync
args=()
if [ -n "$RELEASE_NAME" ]; then
args+=("--name=$RELEASE_NAME")
fi
if [ -n "$RELEASE_VERSION" ]; then
args+=("--release-version=$RELEASE_VERSION")
fi
./linear-release sync "${args[@]}"

complete:
name: Complete release
Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -162,13 +162,13 @@ linear-release update --stage="in review" --name="Release 1.2.0"

### Command Targeting

| Command | With `--release-version` | Without `--release-version` |
| ---------- | -------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `sync` | Targets matching version or creates a release for that version | Continuous pipelines create a release with short SHA name/version. Scheduled pipelines use the currently started release, or move the latest planned release to started automatically if no started release can be found. |
| `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 |
| Command | With `--release-version` | Without `--release-version` |
| ---------- | ---------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `sync` | Targets matching version, labels an unversioned started release, or creates a new release for that version | Continuous pipelines create a release with short SHA name/version. Scheduled pipelines use the currently started release, or move the latest planned release to started automatically if no started release can be found. |
| `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 `--release-version` in CI, especially when releases overlap.
For scheduled pipelines, prefer always passing `--release-version` in CI, especially when releases overlap. Only `sync` sets the version on a release — `complete` and `update` strictly look up by version. If your CI has no natural labeling moment (e.g. tag-driven releases), run `sync --release-version=X` immediately before `complete --release-version=X` at release time.

### JSON Output

Expand Down
Loading