You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add release automation script and auto-tag workflow (#25)
Mirrors the `pnpm release` flow from linear-release. Adds:
- VERSION file as the source of truth for the action's version
- scripts/release.sh — preflights, creates a release/X.Y.Z branch,
bumps VERSION + the cli_version default in action.yml + the README
inputs table, and opens a PR
- .github/workflows/auto-tag-release.yml — on merged release/* PRs,
validates the branch matches the VERSION file, pushes vX.Y.Z, and
triggers the existing Release workflow
- workflow_dispatch trigger on release.yml so the auto-tag workflow
can fire it via gh workflow run
- RELEASING.md rewritten around the new flow
Copy file name to clipboardExpand all lines: RELEASING.md
+55-13Lines changed: 55 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,26 +4,68 @@ This document describes how to cut a new release of `linear-release-action`.
4
4
5
5
## When to release
6
6
7
-
Cut a new release whenever `main` has changes that should be picked up by consumers — most commonly after bumping the default `cli_version` in [`action.yml`](./action.yml) to track a new [`linear-release` CLI](https://github.com/linear/linear-release)release.
7
+
Cut a new release whenever `main` has changes that should be picked up by consumers — most commonly after the [`linear-release` CLI](https://github.com/linear/linear-release)ships a new version that the action should default to.
8
8
9
-
## How to release
9
+
## Prerequisites
10
10
11
-
From a clean `main` checkout that's up to date with `origin/main`, push a `vMAJOR.MINOR.PATCH` tag:
11
+
- You must be on the `main` branch with a clean working tree, up to date with `origin/main`
12
+
- The [GitHub CLI](https://cli.github.com) (`gh`) must be installed and authenticated
13
+
14
+
## Creating a release
15
+
16
+
Run the release script with the target version:
12
17
13
18
```bash
14
-
git checkout main && git pull
15
-
git tag v0.7.2
16
-
git push origin v0.7.2
19
+
./scripts/release.sh <version>
17
20
```
18
21
19
-
That triggers the [Release workflow](./.github/workflows/release.yml), which:
22
+
For example:
23
+
24
+
```bash
25
+
./scripts/release.sh 0.10.0
26
+
```
27
+
28
+
The version must follow `MAJOR.MINOR.PATCH` format (e.g., `0.10.0`, `1.0.0`).
29
+
30
+
## What happens
31
+
32
+
The release script (`scripts/release.sh`) and CI workflows handle the full process:
33
+
34
+
### 1. `./scripts/release.sh <version>` (local)
35
+
36
+
The script runs preflight checks and then:
37
+
38
+
1. Validates the version format
39
+
2. Checks that `gh` is installed and authenticated
40
+
3. Verifies the working tree is clean, you're on `main`, and it's up to date with `origin/main`
41
+
4. Ensures the `v<version>` tag and `release/<version>` branch don't already exist
42
+
5. Creates a `release/<version>` branch
43
+
6. Bumps the version in [`VERSION`](./VERSION), the `cli_version` default in [`action.yml`](./action.yml), and the inputs table in [`README.md`](./README.md)
44
+
7. Commits the change and pushes the branch
45
+
8. Opens a PR against `main` via `gh pr create`
46
+
47
+
### 2. PR review and merge
48
+
49
+
Review and merge the PR as usual. The PR contains the version bumps only.
50
+
51
+
### 3. Auto-tagging (CI)
52
+
53
+
When a PR from a `release/*` branch is merged into `main`, the [Auto-tag release workflow](./.github/workflows/auto-tag-release.yml) runs automatically:
54
+
55
+
1. Validates that the branch version matches the `VERSION` file on `main`
56
+
2. Creates and pushes the `v<version>` tag
57
+
3. Triggers the [Release workflow](./.github/workflows/release.yml)
58
+
59
+
### 4. Release workflow (CI)
60
+
61
+
The Release workflow then:
20
62
21
-
1. Validates the tag format.
22
-
2. Force-updates the floating `v<major>` tag (e.g. `v0`) to the same commit so consumers using `linear/linear-release-action@v0` pick up the change automatically.
23
-
3. Creates a GitHub Release with auto-generated notes from the merged PRs since the previous tag.
63
+
1. Validates the tag format
64
+
2. Force-updates the floating `v<major>` tag (e.g. `v0`) to the same commit so consumers using `linear/linear-release-action@v0` pick up the change automatically
65
+
3. Creates a GitHub Release with auto-generated notes from the merged PRs since the previous tag
24
66
25
67
## Notes
26
68
27
-
- Consumers reference this action as `linear/linear-release-action@v0` (the floating major tag), so the major-tag move in step 2 is the load-bearing step. Without it, consumers stay on whichever commit the major tag previously pointed to.
28
-
- The action has no version-bearing file in the repo — the source of truth for the action's version is the git tag itself.
29
-
- The CLI version that the action installs at runtime is controlled by [`action.yml`'s `cli_version` default](./action.yml). To bump it, open a regular PR updating `action.yml` and `README.md`, merge, then cut a new action release with the steps above.
69
+
- Consumers reference this action as `linear/linear-release-action@v0` (the floating major tag), so the major-tag move is the load-bearing step. Without it, consumers stay on whichever commit the major tag previously pointed to.
70
+
- The source of truth for the action's version is [`VERSION`](./VERSION); the auto-tag workflow fails if the branch name and `VERSION` file disagree.
71
+
- The script bumps the `cli_version` default to match the action version. If you need a release where these diverge, edit the release branch by hand before merging the PR — the auto-tag workflow validates the `VERSION` file, not `cli_version`.
0 commit comments