Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,14 @@ jobs:
args: release --clean --release-notes ${{ runner.temp }}/release-notes.md
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

# Snapshot builds in CI skip the release notes, so check the real release.
- name: Check the release has notes
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
body="$(gh release view "$GITHUB_REF_NAME" --repo "$GITHUB_REPOSITORY" --json body --jq .body)"
if [ -z "$(printf '%s' "$body" | tr -d '[:space:]')" ]; then
echo "::error::release $GITHUB_REF_NAME has empty notes"
exit 1
fi
9 changes: 6 additions & 3 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,13 @@ checksum:
snapshot:
version_template: "{{ incpatch .Version }}-next"

# Release notes come from CHANGELOG.md (scripts/release-notes.sh), so the
# changelog stays the single place where changes are described.
# Release notes come from CHANGELOG.md (scripts/release-notes.sh, passed with
# --release-notes), so the changelog stays the single place where changes are
# described. The changelog pipe must stay enabled: it is the pipe that reads
# --release-notes, and disabling it publishes a release with empty notes. Given
# a notes file, it does not generate a changelog from the Git history.
changelog:
disable: true
disable: false

release:
github:
Expand Down
Loading