Skip to content

Commit 2b89f7b

Browse files
committed
Create the changelog before creating the mergeback branch
1 parent d545e9b commit 2b89f7b

File tree

1 file changed

+14
-12
lines changed

1 file changed

+14
-12
lines changed

.github/workflows/post-release-mergeback.yml

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,17 @@ jobs:
108108
# - `--force` since we're overwriting the `vN` tag
109109
git push origin --atomic --force refs/tags/"${VERSION}" refs/tags/"${major_version_tag}"
110110
111+
- name: Prepare partial Changelog
112+
env:
113+
PARTIAL_CHANGELOG: "${{ runner.temp }}/partial_changelog.md"
114+
VERSION: "${{ steps.getVersion.outputs.version }}"
115+
run: |
116+
python .github/workflows/script/prepare_changelog.py CHANGELOG.md "$VERSION" > $PARTIAL_CHANGELOG
117+
118+
echo "::group::Partial CHANGELOG"
119+
cat $PARTIAL_CHANGELOG
120+
echo "::endgroup::"
121+
111122
- name: Create mergeback branch
112123
if: ${{ steps.check.outputs.exists != 'true' && endsWith(github.ref_name, steps.getVersion.outputs.latest_release_branch) }}
113124
env:
@@ -151,24 +162,15 @@ jobs:
151162
--assignee "${GITHUB_ACTOR}" \
152163
--draft
153164
154-
155-
- name: Prepare the partial Changelog
156-
env:
157-
VERSION: "${{ steps.getVersion.outputs.version }}"
158-
PARTIAL_CHANGELOG: "${{ runner.temp }}/partial_changelog.md"
159-
run: |
160-
# Prepare the partial changelog for the release notes
161-
python .github/workflows/script/prepare_changelog.py CHANGELOG.md "$VERSION"> $PARTIAL_CHANGELOG
162-
163165
- name: Create the GitHub release
164166
env:
165-
VERSION: "${{ steps.getVersion.outputs.version }}"
166167
PARTIAL_CHANGELOG: "${{ runner.temp }}/partial_changelog.md"
168+
VERSION: "${{ steps.getVersion.outputs.version }}"
167169
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
168170
run: |
169171
# Do not mark this release as latest. The most recent CLI release must be marked as latest.
170172
gh release create \
171173
"$VERSION" \
172174
--latest=false \
173-
-t "$VERSION" \
174-
-F "$PARTIAL_CHANGELOG"
175+
--title "$VERSION" \
176+
--notes-file "$PARTIAL_CHANGELOG"

0 commit comments

Comments
 (0)