Skip to content

Commit ee55ad3

Browse files
authored
Merge pull request #143 from Cadair/changelog_updater
Automatically update changelog in the repo after release
2 parents 7cdccb7 + 74cd971 commit ee55ad3

File tree

2 files changed

+38
-6
lines changed

2 files changed

+38
-6
lines changed
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# This workflow takes the GitHub release notes an updates the changelog on the
2+
# master branch with the body of the release notes, thereby keeping a log in
3+
# the git repo of the changes.
4+
5+
name: "Update Changelog"
6+
7+
on:
8+
workflow_dispatch:
9+
release:
10+
types: [released]
11+
12+
jobs:
13+
update:
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- name: Checkout code
18+
uses: actions/checkout@v2
19+
with:
20+
ref: master
21+
22+
- name: Update Changelog
23+
uses: stefanzweifel/changelog-updater-action@v1
24+
with:
25+
release-notes: ${{ github.event.release.body }}
26+
latest-version: ${{ github.event.release.name }}
27+
28+
- name: Commit updated CHANGELOG
29+
uses: stefanzweifel/git-auto-commit-action@v4
30+
with:
31+
branch: master
32+
commit_message: Update CHANGELOG
33+
file_pattern: CHANGES.md

RELEASING.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,10 @@
22

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

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

0 commit comments

Comments
 (0)