Skip to content

Commit 5f519a3

Browse files
committed
Merge branch 'main' into henrymercer/zstd-stream
2 parents 7d365b9 + b0b722f commit 5f519a3

15 files changed

+115
-7
lines changed

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

Lines changed: 24 additions & 0 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:
@@ -150,3 +161,16 @@ jobs:
150161
--body "${pr_body}" \
151162
--assignee "${GITHUB_ACTOR}" \
152163
--draft
164+
165+
- name: Create the GitHub release
166+
env:
167+
PARTIAL_CHANGELOG: "${{ runner.temp }}/partial_changelog.md"
168+
VERSION: "${{ steps.getVersion.outputs.version }}"
169+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
170+
run: |
171+
# Do not mark this release as latest. The most recent CLI release must be marked as latest.
172+
gh release create \
173+
"$VERSION" \
174+
--latest=false \
175+
--title "$VERSION" \
176+
--notes-file "$PARTIAL_CHANGELOG"
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
import os
2+
import sys
3+
4+
EMPTY_CHANGELOG = 'No changes.\n\n'
5+
6+
# Prepare the changelog for the new release
7+
# This function will extract the part of the changelog that
8+
# we want to include in the new release.
9+
def extract_changelog_snippet(changelog_file, version_tag):
10+
output = ''
11+
if (not os.path.exists(changelog_file)):
12+
output = EMPTY_CHANGELOG
13+
14+
else:
15+
with open('CHANGELOG.md', 'r') as f:
16+
lines = f.readlines()
17+
18+
# Include everything up to, but excluding the second heading
19+
found_first_section = False
20+
for i, line in enumerate(lines):
21+
if line.startswith('## '):
22+
if found_first_section:
23+
break
24+
found_first_section = True
25+
output += line
26+
27+
output += f"See the full [CHANGELOG.md](https://github.com/github/codeql-action/blob/{version_tag}/CHANGELOG.md) for more information."
28+
29+
return output
30+
31+
32+
if len(sys.argv) < 3:
33+
raise Exception('Expecting argument: changelog_file version_tag')
34+
changelog_file = sys.argv[1]
35+
version_tag = sys.argv[2]
36+
37+
print(extract_changelog_snippet(changelog_file, version_tag))

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ Note that the only difference between `v2` and `v3` of the CodeQL Action is the
88

99
No user facing changes.
1010

11+
## 3.26.13 - 14 Oct 2024
12+
13+
No user facing changes.
14+
1115
## 3.26.12 - 07 Oct 2024
1216

1317
- _Upcoming breaking change_: Add a deprecation warning for customers using CodeQL version 2.14.5 and earlier. These versions of CodeQL were discontinued on 24 September 2024 alongside GitHub Enterprise Server 3.10, and will be unsupported by CodeQL Action versions 3.27.0 and later and versions 2.27.0 and later. [#2520](https://github.com/github/codeql-action/pull/2520)

lib/feature-flags.js

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/feature-flags.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/init-action.js

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/init-action.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/tools-features.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/tools-features.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

node_modules/.package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)