Skip to content

Commit c87da45

Browse files
authored
Releaser Pleaser flow (#3)
* add releaser pleaser * make the release.yml workflow automated based on tag push * add little explanation on how releaser-pleaser works
1 parent 69b4ac9 commit c87da45

5 files changed

Lines changed: 48 additions & 31 deletions

File tree

.github/workflows/release.yml

Lines changed: 3 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
name: Release
22

33
on:
4-
workflow_dispatch:
5-
inputs:
6-
version:
7-
description: "Version to release (e.g. v1.2.3)"
8-
required: true
4+
push:
5+
tags:
6+
- "v*.*.*"
97

108
permissions:
119
contents: write
@@ -18,23 +16,6 @@ jobs:
1816
with:
1917
fetch-depth: 0
2018

21-
- name: Validate version format
22-
run: |
23-
if [[ ! "${{ github.event.inputs.version }}" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
24-
echo "Error: version must match v<major>.<minor>.<patch> (e.g. v1.2.3)"
25-
exit 1
26-
fi
27-
28-
- name: Configure git
29-
run: |
30-
git config user.name "github-actions[bot]"
31-
git config user.email "github-actions[bot]@users.noreply.github.com"
32-
33-
- name: Create and push tag
34-
run: |
35-
git tag -a "${{ github.event.inputs.version }}" -m "Release ${{ github.event.inputs.version }}"
36-
git push origin "${{ github.event.inputs.version }}"
37-
3819
- uses: jdx/mise-action@v3
3920
with:
4021
version: 2026.3.8
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: releaser-pleaser
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request_target:
7+
types:
8+
- edited
9+
- labeled
10+
- unlabeled
11+
12+
concurrency:
13+
group: releaser-pleaser
14+
cancel-in-progress: true
15+
16+
jobs:
17+
releaser-pleaser:
18+
runs-on: ubuntu-latest
19+
permissions:
20+
contents: write
21+
pull-requests: write
22+
steps:
23+
- name: releaser-pleaser
24+
uses: apricote/releaser-pleaser@v0.8.0
25+
with:
26+
token: ${{ secrets.RELEASER_PLEASER_TOKEN }}
27+
extra-files: |
28+
cmd/qcloud/main.go

.goreleaser.yaml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,4 @@ snapshot:
3838
version_template: "{{ .Tag }}-next"
3939

4040
changelog:
41-
sort: asc
42-
filters:
43-
exclude:
44-
- "^docs:"
45-
- "^test:"
46-
- "^chore:"
41+
disable: true

CONTRIBUTING.md

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,26 @@ make test
2424

2525
## Building
2626

27-
The cli binary is build in the `./build` directory, this is mostly for building locally.
27+
The cli binary is built in the `./build` directory, this is mostly for building locally.
2828

2929
```bash
3030
make build
3131
```
3232

33-
For release for multiple platforms, goreleaser is used in CI.
33+
## Releasing
34+
35+
The project uses [releaser-pleaser](https://apricote.github.io/releaser-pleaser/introduction.html) to automate releases.
36+
37+
Releases are driven by [conventional commits](https://www.conventionalcommits.org/). Each commit merged to `main` is classified by its prefix:
38+
39+
- `fix:` patches (e.g. `fix: correct cluster list pagination`)
40+
- `feat:` minor releases (e.g. `feat: add backup commands`)
41+
- `feat!:` or `BREAKING CHANGE:` major releases
42+
43+
After merging to `main`, releaser-pleaser opens or updates a "release PR" that bumps the version and updates the changelog. Merging that PR tags the commit and triggers GoReleaser to publish the GitHub release and binaries.
44+
45+
No manual tagging is needed.
46+
3447

3548
## Conventions
3649

cmd/qcloud/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99
"github.com/qdrant/qcloud-cli/internal/state"
1010
)
1111

12-
var version = "dev"
12+
var version = "dev" // x-releaser-pleaser-version
1313

1414
func main() {
1515
ctx := context.Background()

0 commit comments

Comments
 (0)