Skip to content

Commit

Permalink
Merge pull request #143 from Cadair/changelog_updater
Browse files Browse the repository at this point in the history
Automatically update changelog in the repo after release
  • Loading branch information
Cadair committed Apr 21, 2022
2 parents 7cdccb7 + 74cd971 commit ee55ad3
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 6 deletions.
33 changes: 33 additions & 0 deletions .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
11 changes: 5 additions & 6 deletions RELEASING.md
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 🍻.

0 comments on commit ee55ad3

Please sign in to comment.