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
23 changes: 23 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ Once installed, run it from your AI agent with `/linear-release-setup` (or just
| `include_paths` | No | | Filter commits by file paths (comma-separated globs for monorepos) |
| `base_ref` | No | | Override the `sync` scan base. Exclusive: scans `<base_ref>..HEAD` |
| `links` | No | | Links to attach to the targeted release, one per line. Each value must be either an absolute URL or `Label=URL`. |
| `documents` | No | | Documents to attach to the targeted release, one per line as `[Title=]path/to/file.md` (title inferred from the filename if omitted). Existing documents with the same title are updated. |
| `release_notes` | No | | Path to a markdown file used as the release notes for this release. |
| `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 |
Expand Down Expand Up @@ -182,6 +184,27 @@ When `base_ref` is provided, it overrides automatic base selection for that run.
Deploy dashboard=https://deploys.example.com/v1.2.0
```

### Documents and release notes

Attach release notes and supporting documents generated by your workflow. `release_notes` is a single file (last set wins if the action runs more than once for the same release). `documents` is repeatable and keyed by title — re-running the action with the same title updates the existing document in place.

```yaml
- name: Build release artifacts
run: |
./scripts/generate-changelog.sh > CHANGELOG.md
./scripts/deploy.sh | tee deploy.log

- uses: linear/linear-release-action@v0
with:
access_key: ${{ secrets.LINEAR_ACCESS_KEY }}
release_notes: CHANGELOG.md
documents: |
Deploy log=deploy.log
docs/CHANGELOG.md
```

File paths are relative to the workflow's working directory. Omit `Title=` to infer the title from the filename (e.g. `docs/CHANGELOG.md` → `CHANGELOG`).

## 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.
Expand Down
8 changes: 8 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,12 @@ inputs:
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
documents:
description: Documents to attach to the targeted release. One per line as "[Title=]path/to/file.md" (title inferred from the filename if omitted). Existing documents on the release with the same title are updated.
required: false
release_notes:
description: Path to a markdown file used as the release notes for this release.
required: false
log_level:
description: Log verbosity. Use "quiet" for errors only or "verbose" for detailed progress. Omit for default output.
required: false
Expand Down Expand Up @@ -83,6 +89,8 @@ runs:
INPUT_INCLUDE_PATHS: ${{ inputs.include_paths }}
INPUT_BASE_REF: ${{ inputs.base_ref }}
INPUT_LINKS: ${{ inputs.links }}
INPUT_DOCUMENTS: ${{ inputs.documents }}
INPUT_RELEASE_NOTES: ${{ inputs.release_notes }}
INPUT_LOG_LEVEL: ${{ inputs.log_level }}
INPUT_TIMEOUT: ${{ inputs.timeout }}

Expand Down
7 changes: 7 additions & 0 deletions run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,13 @@ if [[ -n "${INPUT_LINKS:-}" ]]; then
args+=("--link=${link}")
done <<<"${INPUT_LINKS}"
fi
if [[ -n "${INPUT_DOCUMENTS:-}" ]]; then
while IFS= read -r doc || [[ -n "$doc" ]]; do
[[ "$doc" =~ ^[[:space:]]*$ ]] && continue
args+=("--document-file=${doc}")
done <<<"${INPUT_DOCUMENTS}"
fi
[[ -n "${INPUT_RELEASE_NOTES:-}" ]] && args+=("--release-notes-file=${INPUT_RELEASE_NOTES}")
[[ -n "${INPUT_TIMEOUT:-}" ]] && args+=("--timeout=${INPUT_TIMEOUT}")

if [[ -n "${INPUT_LOG_LEVEL:-}" ]]; then
Expand Down
Loading