mirror of
https://github.com/github/codeql-action.git
synced 2026-01-04 05:30:16 +08:00
Create the changelog before creating the mergeback branch
This commit is contained in:
26
.github/workflows/post-release-mergeback.yml
vendored
26
.github/workflows/post-release-mergeback.yml
vendored
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user