You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit a49e01a
Browse filesBrowse the repository at this point in the historyBrowse files
feat(update-codeql-version): add optional release_bump input to publish in the same PR (#167)
* feat(update-codeql-version): add optional release_bump input to fold a release into the same PR
Adds an optional 'release_bump' string input (patch/minor/major, default
empty) to update-codeql-version.yml. When set, the workflow runs the same
42ByteLabs/patch-release-me step update-release.yml uses, in the same run,
folding a full release bump (every pack's version:, configs/*.yml refs,
and cross-pack -libs pins) into the CLI/library dependency-refresh PR.
Since publish.yml's auto-trigger fires on any push to main that changes
.release.yml, merging this combined PR is then enough by itself to kick
off the real batch publish - no separate update-release.yml run needed
afterward for same-series patch bumps expected to be safe.
Also:
- Adds /codeql_home/ to .release.yml's excludes, since the new release_bump
code path runs patch-release-me in a job where codeql_home/ already
exists (from the earlier Setup CodeQL step) - a scenario update-release.yml,
run standalone, never previously encountered.
- Rewrites the PR title/body generation to branch on whether release_bump
was set, so the PR clearly documents whether merging it will publish.
- Documents the new input and combined-PR flow in CONTRIBUTING.md's
'Updating the pinned CodeQL CLI/library version' section.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
* fix(update-codeql-version): write pr-body.md outside the git working tree
Write the generated PR body to \ instead of the repo root, so
peter-evans/create-pull-request doesn't pick it up as an untracked file and
accidentally commit it into the PR it opens.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
# Bumps the pinned CodeQL CLI/library version (.codeqlversion) and refreshes every
4
4
# pack's codeql-pack.lock.yml against it, then opens a PR with the result.
5
5
#
6
-
#This does NOT publish anything by itself and does NOT bump any pack's `version:`
6
+
#By default this does NOT publish anything and does NOT bump any pack's `version:`
7
7
# field - it only prepares the dependency-refresh half of the process documented in
8
8
# CONTRIBUTING.md's "Updating the pinned CodeQL CLI/library version" section. A human
9
9
# (or a delegated Copilot coding agent) still needs to fix any compilation/test
10
10
# breakage the new CLI/library versions introduce before merging, and the existing
11
11
# "CodeQL Update Release" workflow (update-release.yml) is still what bumps every
12
12
# pack's version and triggers the real batch publish once this PR is merged.
13
+
#
14
+
# Optionally, set `release_bump` (patch/minor/major) to fold that release bump into
15
+
# THIS SAME PR - it runs the same `patch-release-me` step update-release.yml uses,
16
+
# which bumps `.release.yml`'s repo-wide version and propagates it to every pack's
17
+
# own `version:` field, `configs/*.yml` references, and cross-pack `-libs` pins in
18
+
# one pass. Since publish.yml's auto-trigger fires on any push to `main` that changes
19
+
# `.release.yml`, merging this one combined PR is then enough to kick off the real
20
+
# batch publish immediately - no separate "CodeQL Update Release" run needed
21
+
# afterward. Leave `release_bump` empty (the default) to only refresh dependencies,
22
+
# e.g. when you expect CI breakage that needs fixing before it's safe to publish.
13
23
on:
14
24
workflow_dispatch:
15
25
inputs:
16
26
codeql_version:
17
27
description: "New CodeQL CLI version to pin, e.g. 2.22.0 (a leading 'v' is fine too)"
18
28
required: true
19
29
type: string
30
+
release_bump:
31
+
description: "Optional: patch/minor/major - also bump the repo release version and every pack's version in this same PR to trigger a real publish on merge. Leave empty to only refresh dependencies (default)."
32
+
required: false
33
+
type: string
34
+
default: ""
20
35
21
36
jobs:
22
37
update-codeql-version:
@@ -41,6 +56,17 @@ jobs:
41
56
fi
42
57
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
43
58
59
+
- name: Validate release_bump input
60
+
id: release_bump
61
+
run: |
62
+
set -euo pipefail
63
+
BUMP="${{ inputs.release_bump }}"
64
+
if [[ -n "$BUMP" && ! "$BUMP" =~ ^(patch|minor|major)$ ]]; then
65
+
echo "::error::release_bump must be 'patch', 'minor', 'major', or empty - got: ${{ inputs.release_bump }}" >&2
0 commit comments