diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 91f5a4c..b322473 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -74,13 +74,26 @@ jobs: merge-multiple: true - name: Generate checksums run: cd artifacts && sha256sum *.tar.gz > checksums.txt + - name: Extract release notes + run: | + version="${RELEASE_TAG#v}" + awk -v version="$version" ' + $0 ~ "^## \\[" version "\\]( - |$)" { in_section = 1; next } + in_section && /^## \[/ { exit } + in_section { print } + ' CHANGELOG.md > release-notes.md + + if ! awk 'NF { found = 1 } END { exit !found }' release-notes.md; then + echo "No CHANGELOG.md notes found for ${RELEASE_TAG}" + exit 1 + fi - name: Create release env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | gh release create "${{ env.RELEASE_TAG }}" \ --title "${{ env.RELEASE_TAG }}" \ - --generate-notes \ + --notes-file release-notes.md \ artifacts/*.tar.gz \ artifacts/checksums.txt diff --git a/README.md b/README.md index 247ce19..3c87025 100644 --- a/README.md +++ b/README.md @@ -598,11 +598,11 @@ make release VERSION=0.2.0 # 2. Push the branch and merge it into main -# 3. Tag and push the tag +# 3. Review CHANGELOG.md, then tag and push the tag make tag VERSION=0.2.0 ``` -This updates the version in `internal/version/version.go` on a release branch. After merging to main, `make tag` creates and pushes the git tag. Users can then upgrade via mise: +This updates the version in `internal/version/version.go` on a release branch. After merging to main, review the matching `CHANGELOG.md` entry because the GitHub release notes are published from that section. Then `make tag` creates and pushes the git tag. Users can then upgrade via mise: ```sh mise upgrade aqua:remoteoss/dexter