diff --git a/.github/workflows/update-changelog.yaml b/.github/workflows/update-changelog.yaml new file mode 100644 index 00000000..ba2f6f75 --- /dev/null +++ b/.github/workflows/update-changelog.yaml @@ -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 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 🍻.