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
Automate CLI releases via GitHub Actions triggered by pushing version tags.
The workflow uses goreleaser-pro to build binaries, publish to npm, and
update the Homebrew tap.
Required secrets: GORELEASER_KEY, NPM_TOKEN, HOMEBREW_TAP_TOKEN
Copy file name to clipboardExpand all lines: DEVELOPMENT.md
+32-13Lines changed: 32 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -58,26 +58,45 @@ A typical workflow we encounter is updating the API and integrating those change
58
58
59
59
### Releasing a new version
60
60
61
-
Prerequisites:
61
+
Releases are automated via GitHub Actions. Simply push a version tag and the release workflow will handle the rest.
62
62
63
-
- Make sure you have **goreleaser-pro** installed via `brew install --cask goreleaser/tap/goreleaser-pro`. You will need a license key (in 1pw), and then `export GORELEASER_KEY=<the key>`. **Note: goreleaser-pro is required, not the standard goreleaser version.**
63
+
#### To release:
64
64
65
-
- Grab the NPM token for our org (in 1pw) and run `npm config set '//registry.npmjs.org/:_authToken'=<the token>`
65
+
```bash
66
+
# Find the latest version
67
+
git describe --abbrev=0
66
68
67
-
- export a `GITHUB_TOKEN` with repo and write:packages permissions: https://github.com/settings/tokens/new?scopes=repo,write:packages.
69
+
# Create and push a new tag (bump version following https://semver.org/)
70
+
git tag -a v<VERSION> -m "Version <VERSION>"
71
+
git push origin v<VERSION>
72
+
```
68
73
69
-
With a clean tree on the branch you want to release (can be main or a pr branch you're about to merge, doesn't matter), run:
74
+
The release workflow will automatically:
75
+
- Build binaries for darwin, linux, and windows (amd64 and arm64)
76
+
- Create a GitHub release with changelog
77
+
- Publish to npm as `@onkernel/cli`
78
+
- Update the Homebrew formula in `onkernel/homebrew-tap`
70
79
71
-
```bash
72
-
make release-dry-run
73
-
```
80
+
#### Required GitHub Secrets
74
81
75
-
This will check that everything is working, but not actually release anything.
76
-
You should see one error about there not being a git tag, and that's fine.
82
+
The following secrets must be configured in the repository settings:
77
83
78
-
To actually release, run:
84
+
| Secret | Description |
85
+
|--------|-------------|
86
+
|`GORELEASER_KEY`| GoReleaser Pro license key (required for npm and homebrew publishing) |
87
+
|`NPM_TOKEN`| npm access token for publishing `@onkernel/cli`|
88
+
|`HOMEBREW_TAP_TOKEN`| GitHub PAT with write access to `onkernel/homebrew-tap` repository |
89
+
90
+
#### Local dry-run (optional)
91
+
92
+
To test the release process locally before pushing a tag:
93
+
94
+
Prerequisites:
95
+
- Install **goreleaser-pro** via `brew install --cask goreleaser/tap/goreleaser-pro`
96
+
- Export `GORELEASER_KEY=<license key from 1pw>`
79
97
80
98
```bash
81
-
# use `git describe --abbrev=0` to find the latest version and then bump it following https://semver.org/
82
-
./scripts/release.sh <version> [description]
99
+
make release-dry-run
83
100
```
101
+
102
+
This will check that everything is working without actually releasing anything.
0 commit comments