Skip to content

Commit 8412c11

Browse files
committed
fix: Use git-cliff for release notes via --release-notes flag
- Add git-cliff install and RELEASE_NOTES.md generation to workflow - Pass --release-notes=RELEASE_NOTES.md to GoReleaser - Disable GoReleaser's built-in changelog (git-cliff handles it) - Update README with pre-release changelog steps
1 parent e233e26 commit 8412c11

File tree

3 files changed

+15
-5
lines changed

3 files changed

+15
-5
lines changed

.github/workflows/release.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,16 @@ jobs:
3939
- name: Install Syft (for SBOM generation)
4040
uses: anchore/sbom-action/download-syft@v0.23.0
4141

42+
- name: Install git-cliff
43+
uses: kenji-miyake/setup-git-cliff@v2
44+
45+
- name: Generate release notes
46+
run: git-cliff --latest --strip header -o RELEASE_NOTES.md
47+
4248
- name: Run GoReleaser
4349
uses: goreleaser/goreleaser-action@v6
4450
with:
4551
version: '~> v2'
46-
args: release --clean
52+
args: release --clean --release-notes=RELEASE_NOTES.md
4753
env:
4854
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.goreleaser.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ snapshot:
5959
version_template: "{{ .Tag }}"
6060

6161
changelog:
62-
sort: asc
62+
disable: true
6363

6464
nfpms:
6565
- id: cisshgo

README.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,16 +67,20 @@ goreleaser release --snapshot --clean --skip=publish
6767

6868
Releases are automated via GitHub Actions. To create a new release:
6969

70-
1. Create and push a tag:
70+
1. Update the changelog and tag:
7171

7272
```bash
73-
git tag v0.1.2
74-
git push origin v0.1.2
73+
git-cliff --tag v1.2.3 -o CHANGELOG.md
74+
git add CHANGELOG.md
75+
git commit -m "docs: update changelog for v1.2.3"
76+
git tag -a v1.2.3 -m "v1.2.3"
77+
git push origin master v1.2.3
7578
```
7679

7780
2. GitHub Actions will automatically:
7881
- Build binaries for all platforms (linux/darwin/windows, amd64/arm64)
7982
- Create multi-arch Docker images and push to GitHub Container Registry (ghcr.io)
83+
- Generate release notes from git-cliff
8084
- Generate SBOMs for security compliance
8185
- Create GitHub Release with binaries, archives, and checksums
8286
- Build deb/rpm packages

0 commit comments

Comments
 (0)