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 57dea59 commit d2a1fb3
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 1 deletion.
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/
1 change: 1 addition & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ changelog:
exclude:
- '^docs:'
- '^test:'
- '^Merge'

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


# [2.1.6-test]

Test

# [2.1.5]

* Move to Go Modules from godeps (#253, @epk)
Expand Down

0 comments on commit d2a1fb3

Please sign in to comment.