Skip to content

Commit 1e6f26d

Browse files
authored
Merge pull request #162 from hookdeck/chore/beta-releases
chore: add beta release support across all package managers
2 parents 02b141b + 5b27c51 commit 1e6f26d

File tree

4 files changed

+131
-3
lines changed

4 files changed

+131
-3
lines changed

.goreleaser/linux.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ builds:
2929
- linux
3030
goarch:
3131
- arm64
32+
release:
33+
prerelease: auto
34+
mode: append
3235
changelog:
3336
sort: asc
3437
filters:
@@ -40,12 +43,15 @@ checksum:
4043
snapshot:
4144
name_template: "{{ .Tag }}-next"
4245
nfpms:
43-
- builds:
46+
- package_name: "{{ if .Prerelease }}hookdeck-beta{{ else }}hookdeck{{ end }}"
47+
file_name_template: "{{ .PackageName }}_{{ .Version }}_{{ .Arch }}"
48+
builds:
4449
- hookdeck-linux
4550
vendor: Hookdeck
4651
homepage: https://hookdeck.com
4752
maintainer: Hookdeck <[email protected]>
48-
description: Hookdeck CLI utility
53+
description: |-
54+
Hookdeck CLI utility{{ if .Prerelease }} (Beta){{ end }}
4955
license: Apache 2.0
5056
formats:
5157
- deb

.goreleaser/mac.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ builds:
2828
- darwin
2929
goarch:
3030
- arm64
31+
release:
32+
prerelease: auto
33+
mode: append
3134
changelog:
3235
sort: asc
3336
filters:
@@ -46,7 +49,7 @@ archives:
4649
- README*
4750
- CHANGELOG*
4851
brews:
49-
- name: hookdeck
52+
- name: "{{ if .Prerelease }}hookdeck-beta{{ else }}hookdeck{{ end }}"
5053
ids:
5154
- hookdeck
5255
repository:
@@ -65,6 +68,10 @@ brews:
6568
6669
caveats: |
6770
❤ Thanks for installing the Hookdeck CLI!
71+
{{ if .Prerelease }}
72+
⚠️ You are using a BETA version. Report issues at:
73+
https://github.com/hookdeck/hookdeck-cli/issues
74+
{{ end }}
6875
6976
If this is your first time using the CLI, run:
7077
hookdeck login

.goreleaser/windows.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ builds:
2424
archives:
2525
- files:
2626
- none*
27+
release:
28+
prerelease: auto
29+
mode: append
2730
changelog:
2831
sort: asc
2932
filters:

README.md

Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,12 @@ Hookdeck CLI is distributed as an NPM package:
2929
npm install hookdeck-cli -g
3030
```
3131

32+
To install a beta (pre-release) version:
33+
34+
```sh
35+
npm install hookdeck-cli@beta -g
36+
```
37+
3238
### macOS
3339

3440
Hookdeck CLI is available on macOS via [Homebrew](https://brew.sh/):
@@ -37,6 +43,12 @@ Hookdeck CLI is available on macOS via [Homebrew](https://brew.sh/):
3743
brew install hookdeck/hookdeck/hookdeck
3844
```
3945

46+
To install a beta (pre-release) version:
47+
48+
```sh
49+
brew install hookdeck/hookdeck/hookdeck-beta
50+
```
51+
4052
### Windows
4153

4254
Hookdeck CLI is available on Windows via the [Scoop](https://scoop.sh/) package manager:
@@ -46,6 +58,12 @@ scoop bucket add hookdeck https://github.com/hookdeck/scoop-hookdeck-cli.git
4658
scoop install hookdeck
4759
```
4860

61+
To install a beta (pre-release) version:
62+
63+
```sh
64+
scoop install hookdeck-beta
65+
```
66+
4967
### Linux Or without package managers
5068

5169
To install the Hookdeck CLI on Linux without a package manager:
@@ -54,6 +72,8 @@ To install the Hookdeck CLI on Linux without a package manager:
5472
2. Unzip the file: tar -xvf hookdeck_X.X.X_linux_amd64.tar.gz
5573
3. Run the executable: ./hookdeck
5674

75+
For beta (pre-release) versions, download the `.deb` or `.rpm` packages from the [GitHub releases page](https://github.com/hookdeck/hookdeck-cli/releases) (look for releases marked as "Pre-release").
76+
5777
### Docker
5878

5979
The CLI is also available as a Docker image: [`hookdeck/hookdeck-cli`](https://hub.docker.com/r/hookdeck/hookdeck-cli).
@@ -63,6 +83,14 @@ docker run --rm -it hookdeck/hookdeck-cli version
6383
hookdeck version x.y.z (beta)
6484
```
6585

86+
To use a specific version (including beta releases), specify the version tag:
87+
88+
```sh
89+
docker run --rm -it hookdeck/hookdeck-cli:v1.2.3-beta.1 version
90+
```
91+
92+
Note: Beta releases do not update the `latest` tag. Only stable releases update `latest`.
93+
6694
If you want to login to your Hookdeck account with the CLI and persist
6795
credentials, you can bind mount the `~/.config/hookdeck` directory:
6896

@@ -643,6 +671,90 @@ docker run --rm -it \
643671
http://host.docker.internal:1234
644672
```
645673

674+
## Releasing
675+
676+
This section describes the branching strategy and release process for the Hookdeck CLI.
677+
678+
### Branching Strategy
679+
680+
The project uses two primary branches:
681+
682+
- **`main`** - The stable, production-ready branch. All production releases are created from this branch.
683+
- **`next`** - The beta/pre-release branch. All new features are merged here first for testing before being promoted to `main`.
684+
685+
### Beta Releases
686+
687+
Beta releases allow you to publish pre-release versions for testing without blocking the `main` branch or affecting stable releases.
688+
689+
**Process:**
690+
691+
1. Ensure all desired features are merged into the `next` branch
692+
2. Pull the latest changes locally:
693+
```sh
694+
git checkout next
695+
git pull origin next
696+
```
697+
3. Create and push a beta tag with a pre-release identifier:
698+
```sh
699+
git tag v1.2.3-beta.0
700+
git push origin v1.2.3-beta.0
701+
```
702+
4. The GitHub Actions workflow will automatically:
703+
- Build binaries for all platforms (macOS, Linux, Windows)
704+
- Create a GitHub pre-release (marked as "Pre-release")
705+
- Publish to NPM with the `beta` tag
706+
- Create beta packages:
707+
- Homebrew: `hookdeck-beta` formula
708+
- Scoop: `hookdeck-beta` package
709+
- Docker: Tagged with the version (e.g., `v1.2.3-beta.0`), but not `latest`
710+
711+
**Installing beta releases:**
712+
713+
```sh
714+
# NPM
715+
npm install hookdeck-cli@beta -g
716+
717+
# Homebrew
718+
brew install hookdeck/hookdeck/hookdeck-beta
719+
720+
# Scoop
721+
scoop install hookdeck-beta
722+
723+
# Docker
724+
docker run hookdeck/hookdeck-cli:v1.2.3-beta.0 version
725+
```
726+
727+
### Production Releases
728+
729+
Production releases are created from the `main` branch using GitHub's release interface.
730+
731+
**Process:**
732+
733+
1. Merge the `next` branch into `main`:
734+
```sh
735+
git checkout main
736+
git pull origin main
737+
git merge next
738+
git push origin main
739+
```
740+
2. Go to the [GitHub Releases page](https://github.com/hookdeck/hookdeck-cli/releases)
741+
3. Click "Draft a new release"
742+
4. Create a new tag with a stable version (e.g., `v1.3.0`)
743+
5. Target the `main` branch
744+
6. Generate release notes or write them manually
745+
7. Publish the release
746+
747+
The GitHub Actions workflow will automatically:
748+
- Build binaries for all platforms
749+
- Create a stable GitHub release
750+
- Publish to NPM with the `latest` tag
751+
- Update package managers:
752+
- Homebrew: `hookdeck` formula
753+
- Scoop: `hookdeck` package
754+
- Docker: Updates both the version tag and `latest`
755+
756+
**Note:** Only stable releases (without pre-release identifiers) will update the `latest` tags across all distribution channels.
757+
646758
## License
647759

648760
Copyright (c) Hookdeck. All rights reserved.

0 commit comments

Comments
 (0)