Skip to content

Commit

Permalink
Triggers, messaging, release notes in changelog CI (#48)
Browse files Browse the repository at this point in the history
1. Changes when the CI is run.

This avoids "bad runs" if a release fails, as it depends on a successful workflow run.

2. Copies the generated release note to the changelog

This intends to reduce merge conflicts due to individually updated changelogs.

3. Big red message in PR to merge

This adds a note to the PR message to not squash to help users perform the correct action.
  • Loading branch information
JesperDramsch authored Nov 11, 2024
1 parent 1163ab7 commit 03c1583
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions .github/workflows/changelog-release-update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@
name: "Update Changelog"

on:
release:
types: [released]
workflow_dispatch: ~
workflow_run:
workflows:
- Upload Python Package
types:
- completed

permissions:
pull-requests: write
Expand All @@ -13,12 +15,13 @@ permissions:
jobs:
update:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}

steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: develop
ref: ${{ github.event.release.target_commitish }}

- name: Update Changelog
uses: stefanzweifel/changelog-updater-action@v1
Expand All @@ -31,6 +34,12 @@ jobs:
uses: peter-evans/create-pull-request@v6
with:
branch: docs/changelog-update-${{ github.event.release.tag_name }}
base: develop
title: '[Changelog] Update to ${{ github.event.release.tag_name }}'
body: |
This PR updates the changelog to include the changes in the latest release.
> [!CAUTION]
> Merge DO NOT squash to correctly update the tag version of `develop` branch.
add-paths: |
CHANGELOG.md

0 comments on commit 03c1583

Please sign in to comment.