From 65eea640a77ef62bc0cb20c43c61dbf0bff32f65 Mon Sep 17 00:00:00 2001 From: Stuart Mumford Date: Thu, 21 Apr 2022 13:29:12 +0100 Subject: [PATCH 1/2] Autochagelogs --- .github/workflows/update-changelog.yaml | 32 +++++++++++++++++++++++++ RELEASING.md | 11 ++++----- 2 files changed, 37 insertions(+), 6 deletions(-) create mode 100644 .github/workflows/update-changelog.yaml diff --git a/.github/workflows/update-changelog.yaml b/.github/workflows/update-changelog.yaml new file mode 100644 index 00000000..da0c992c --- /dev/null +++ b/.github/workflows/update-changelog.yaml @@ -0,0 +1,32 @@ +# 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: + 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 diff --git a/RELEASING.md b/RELEASING.md index f3618c72..d91e4bce 100644 --- a/RELEASING.md +++ b/RELEASING.md @@ -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 🍻. From 74cd971ce06aea5647e39532f14a51719b3c917f Mon Sep 17 00:00:00 2001 From: Stuart Mumford Date: Thu, 21 Apr 2022 13:33:34 +0100 Subject: [PATCH 2/2] Allow manual runs of the changelog workflow --- .github/workflows/update-changelog.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/update-changelog.yaml b/.github/workflows/update-changelog.yaml index da0c992c..ba2f6f75 100644 --- a/.github/workflows/update-changelog.yaml +++ b/.github/workflows/update-changelog.yaml @@ -5,6 +5,7 @@ name: "Update Changelog" on: + workflow_dispatch: release: types: [released]