Skip to content

Automatically update changelog in the repo after release #143

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

Merged
merged 2 commits into from
Apr 21, 2022
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
33 changes: 33 additions & 0 deletions .github/workflows/update-changelog.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# This workflow takes the GitHub release notes an updates the changelog on the
# master branch with the body of the release notes, thereby keeping a log in
# the git repo of the changes.

name: "Update Changelog"

on:
workflow_dispatch:
release:
types: [released]

jobs:
update:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2
with:
ref: master

- name: Update Changelog
uses: stefanzweifel/changelog-updater-action@v1
with:
release-notes: ${{ github.event.release.body }}
latest-version: ${{ github.event.release.name }}

- name: Commit updated CHANGELOG
uses: stefanzweifel/git-auto-commit-action@v4
with:
branch: master
commit_message: Update CHANGELOG
file_pattern: CHANGES.md
11 changes: 5 additions & 6 deletions RELEASING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,10 @@

To make a new release of pytest-mpl follow the following steps:

* Update the chanelog with the date of the release, and ensure that all relevant PRs have changelog entries.
* Push the chanelog to master (via a PR)
* Ensure the sdist and wheel GitHub Actions jobs succeeded on master after the merge of the changelog.
* Ensure the sdist and wheel GitHub Actions jobs succeeded on master after the last merge.
* Also ensure that the tarball built has an autogenerated version number from setuptools_scm.
* Tag the new release, using the format `vX.Y.X`.
* Push the tag with `git push upstream master --follow-tags`
* Watch as GitHub actions builds the sdist and universal wheel and pushes them to PyPI for you.
* Write the release notes in the GitHub releases UI, use the autogenerated
notes and tidy up a little.
* Publish the new release, using the format `vX.Y.X`.
* Watch as GitHub actions builds the sdist and universal wheel and pushes them to PyPI for you, and updates CHANGES.md on the master branch.
* Enjoy the beverage of your choosing 🍻.