Skip to content

Commit

Permalink
GH Actions: automatically write GH release notes from towncrier
Browse files Browse the repository at this point in the history
  • Loading branch information
MetRonnie committed Nov 29, 2023
1 parent ddeaa97 commit f396654
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/1_create_release_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,7 @@ jobs:
uses: cylc/release-actions/build-python-package@v1

- name: Generate changelog
run: |
python3 -m pip install -q towncrier
towncrier build --yes
uses: MetRonnie/release-actions/stage-1/towncrier-build@changelog

- name: Create pull request
uses: cylc/release-actions/stage-1/create-release-pr@v1
Expand Down
15 changes: 9 additions & 6 deletions .github/workflows/2_auto_publish_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,14 @@ jobs:
# # Can try using this for testing:
# repository_url: https://test.pypi.org/legacy/

- name: Write release notes
id: release-notes
uses: MetRonnie/release-actions/stage-2/write-release-notes@changelog
with:
footer: |
Cylc 8 can be installed via pypi or Conda - you don't need to download this release directly.
See the [installation](https://cylc.github.io/cylc-doc/latest/html/installation.html) section of the documentation.
- name: Publish GitHub release
id: create-release
uses: cylc/release-actions/create-release@v1
Expand All @@ -55,12 +63,7 @@ jobs:
tag_name: ${{ env.VERSION }}
release_name: cylc-flow-${{ env.VERSION }}
prerelease: ${{ env.PRERELEASE }}
body: |
See [${{ env.CHANGELOG_FILE }}](https://github.com/${{ github.repository }}/blob/master/${{ env.CHANGELOG_FILE }}) for detail.
Cylc 8 can be installed via pypi or Conda - you don't need to download this release directly.
See the [installation](https://cylc.github.io/cylc-doc/latest/html/installation.html) section of the documentation.
# TODO: Get topmost changelog section somehow and use that as the body?
body_path: ${{ steps.release-notes.outputs.filepath }}

- name: Comment on the release PR with the results & next steps
if: always()
Expand Down

0 comments on commit f396654

Please sign in to comment.