Skip to content

Commit

Permalink
Create the changelog before creating the mergeback branch
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Eisenberg committed Oct 10, 2024
1 parent d545e9b commit 2b89f7b
Showing 1 changed file with 14 additions and 12 deletions.
26 changes: 14 additions & 12 deletions .github/workflows/post-release-mergeback.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,17 @@ jobs:
# - `--force` since we're overwriting the `vN` tag
git push origin --atomic --force refs/tags/"${VERSION}" refs/tags/"${major_version_tag}"
- name: Prepare partial Changelog
env:
PARTIAL_CHANGELOG: "${{ runner.temp }}/partial_changelog.md"
VERSION: "${{ steps.getVersion.outputs.version }}"
run: |
python .github/workflows/script/prepare_changelog.py CHANGELOG.md "$VERSION" > $PARTIAL_CHANGELOG
echo "::group::Partial CHANGELOG"
cat $PARTIAL_CHANGELOG
echo "::endgroup::"
- name: Create mergeback branch
if: ${{ steps.check.outputs.exists != 'true' && endsWith(github.ref_name, steps.getVersion.outputs.latest_release_branch) }}
env:
Expand Down Expand Up @@ -151,24 +162,15 @@ jobs:
--assignee "${GITHUB_ACTOR}" \
--draft
- name: Prepare the partial Changelog
env:
VERSION: "${{ steps.getVersion.outputs.version }}"
PARTIAL_CHANGELOG: "${{ runner.temp }}/partial_changelog.md"
run: |
# Prepare the partial changelog for the release notes
python .github/workflows/script/prepare_changelog.py CHANGELOG.md "$VERSION"> $PARTIAL_CHANGELOG
- name: Create the GitHub release
env:
VERSION: "${{ steps.getVersion.outputs.version }}"
PARTIAL_CHANGELOG: "${{ runner.temp }}/partial_changelog.md"
VERSION: "${{ steps.getVersion.outputs.version }}"
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
# Do not mark this release as latest. The most recent CLI release must be marked as latest.
gh release create \
"$VERSION" \
--latest=false \
-t "$VERSION" \
-F "$PARTIAL_CHANGELOG"
--title "$VERSION" \
--notes-file "$PARTIAL_CHANGELOG"

0 comments on commit 2b89f7b

Please sign in to comment.