Skip to content

Commit

Permalink
Use CHANGELOG for release description
Browse files Browse the repository at this point in the history
`goreleaser` use git commits for building release description.
It is sorted by commit messages and does not provide a clarity.
Update release workflow to extract sevversion changelog from
`CHANGELOG.md` and use it for `goreleaser`.
  • Loading branch information
miry committed Sep 1, 2021
1 parent 758c1e5 commit 6e756a8
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 3 deletions.
9 changes: 8 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,19 @@ jobs:
with:
go-version: 1.17

-
name: Build release changelog
run: |
version=${GITHUB_REF#refs/tags/v*}
mkdir -p tmp
sed '/^# \['$version'\]/,/^# \[/!d;//d;/^\s*$/d' CHANGELOG.md > tmp/release_changelog.md
-
name: Release
uses: goreleaser/goreleaser-action@5a54d7e660bda43b405e8463261b3d25631ffe86
with:
distribution: goreleaser
version: v0.176.0
args: release --rm-dist
args: release --rm-dist --release-notes=tmp/release_changelog.md
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@ dist/

# go mod dependencies
vendor/

tmp/
3 changes: 2 additions & 1 deletion .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ builds:
- <<: *build_default
id: client
main: ./cli
binary: toxiproxy-client-{{.Os}}-{{.Arch}}
binary: toxiproxy-cli-{{.Os}}-{{.Arch}}

checksum:
name_template: checksums.txt
Expand Down Expand Up @@ -125,6 +125,7 @@ changelog:
exclude:
- '^docs:'
- '^test:'
- '^Merge'

archives:
-
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# [Unreleased]

* Use CHANGELOG.md for release description (#306, @miry)

# [2.1.5]

Expand Down
2 changes: 1 addition & 1 deletion dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ up:
- gnu-tar
- goreleaser
- go:
version: 1.16
version: 1.17
modules: true

0 comments on commit 6e756a8

Please sign in to comment.