Create the changelog before creating the mergeback branch

This commit is contained in:
Andrew Eisenberg
2024-10-10 07:50:04 -07:00
parent d545e9b4a6
commit 2b89f7bcf6

View File

@@ -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:
@@ -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"