-
Notifications
You must be signed in to change notification settings - Fork 17
Add RELEASE.md and CHANGELOG.md automation #553
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This adds a RELEASE.md file that describes the release process in detail, and also adds automation for updating the CHANGELOG in the release workflow to reduce manual steps. Now, the publish workflow will create two commits: one will update the CHANGELOG, swapping out "Unreleased" for the new tag, and adding a new "Unreleased" section above it. It commits those changes, then continues on to `npm run package <version>`, which creates another commit, which are both pushed directly to `main`.
| ifeq ($(UNAME_OS),Darwin) | ||
| # Explicitly use the "BSD" sed shipped with Darwin. Otherwise if the user has a | ||
| # different sed (such as gnu-sed) on their PATH this will fail in an opaque | ||
| # manner. /usr/bin/sed can only be modified if SIP is disabled, so this should | ||
| # be relatively safe. | ||
| SED_I := /usr/bin/sed -i '' | ||
| endif | ||
| ifeq ($(UNAME_OS),Linux) | ||
| SED_I := sed -i | ||
| endif |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lifted directly from makego: https://github.com/bufbuild/makego/blob/378a1889b5911a5f71726fc311723bd6215262aa/make/go/base.mk#L57-L66
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lifted this from connect-go, which is a bit more in-depth than ours, since we've wired up some more automation (and have fewer moving parts to consider).
| make updatechangelog VERSION=${{ github.event.release.tag_name }} | ||
| git add CHANGELOG.md | ||
| git commit -m "Update CHANGELOG.md to version ${{ github.event.release.tag_name }}" | ||
| npm run package ${{ github.event.release.tag_name }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was a little tempted to do away with the CHANGELOG.md altogether and just rely on us documenting our releases, but at least the VS Code Marketplace pulls in the CHANGELOG.md from the bundle, so I guess we ought to populate it :).
Noticed this while borrowing the [RELEASE.md approach in vscode-buf][1], thanks! [1]: bufbuild/vscode-buf#553 Signed-off-by: Stefan VanBuren <[email protected]>
|
I'm going to get this merged, but we don't have a need for a release to go out shortly. Happy to help troubleshoot/diagnose when we do need to make a release if this causes trouble. |
This adds a RELEASE.md file that describes the release process in detail, and also adds automation for updating the CHANGELOG in the release workflow to reduce manual steps.
Now, the publish workflow will create two commits: one will update the CHANGELOG, swapping out "Unreleased" for the new tag, and adding a new "Unreleased" section above it. It commits those changes, then continues on to
npm run package <version>, which creates another commit, which are both pushed directly tomain.