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
43 changes: 0 additions & 43 deletions .github/workflows/prepare-release.yml

This file was deleted.

14 changes: 11 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,19 @@ jobs:
uses: actions/checkout@v7
with:
fetch-depth: 0
persist-credentials: true # Needed to fetch the changelog ref.
- name: Changelog
# The CHANGELOG.md section for this tag is the source of truth; it was
# written by prepare-release before the tag was cut.
run: |
git fetch origin refs/notes/changelog:refs/notes/changelog
.github/scripts/changelog-render "${VERSION}" > "${GITHUB_WORKSPACE}/changelog"
awk -v ver="${VERSION}" '
index($0, "<a name=\"" ver "\"></a>") == 1 { found = 1 }
found && /^<a name="/ && index($0, ver) == 0 { exit }
found { print }
' CHANGELOG.md > "${GITHUB_WORKSPACE}/changelog"
if ! grep -q . "${GITHUB_WORKSPACE}/changelog"; then
echo "::error::no CHANGELOG.md section found for ${VERSION}"
exit 1
fi
- name: Create Release
uses: actions/create-release@latest
env:
Expand Down
8 changes: 2 additions & 6 deletions docs/contributor/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,8 @@ The primary helper script is `changelog-edit`. It allows a user to sync down
notes, edit an entry, or both. See the output of the `h` flag for more
information.

The other script of interest is `changelog-render`, which can be used to render
out the changelog on demand, assuming the changelog notes have been pulled
locally.

The `changelog-update` script uses `changelog-render` to add to the
`CHANGELOG.md` file in the repository root.
To turn notes into a `CHANGELOG.md` section and open a release PR, use
`go tool prepare-release` (see [Releases](./releases.md)).

### Formatting

Expand Down
Loading