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 2ffe79f
Browse filesBrowse the repository at this point in the historyBrowse files
ci: dispatch CI on the version PRs that automation opens
The Version Packages and Prepare Python Release workflows push their PR
branches with the workflow token, which starts no workflow, and since
modelcontextprotocol#5048 the TypeScript and Python workflows run on push only, so a close
and reopen (which fires pull_request) never started them either. Both
CI workflows now also accept workflow_dispatch, the one event that
token can start, and both version workflows dispatch them on the PR's
branch after opening or updating it. RELEASING.md and the release skill
describe that path instead of close-and-reopen.
Closesmodelcontextprotocol#5110
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: cliffhall <[email protected]>
Copy file name to clipboardExpand all lines: .github/workflows/prepare-python-release.yml
+15-1Lines changed: 15 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -13,6 +13,12 @@
13
13
# milestone's release issue (the `issue` input), its branch is named for that
14
14
# issue, and it is labeled `v2`. The link is only a cross-reference on
15
15
# `v2/main`; the release issue stays open until the Release is published.
16
+
#
17
+
# It pushes the branch with the workflow token, and a push made with that
18
+
# token starts no workflow, so the PR would get no TypeScript or Python CI
19
+
# (#5110); a close and reopen fires only `pull_request`, which those workflows
20
+
# do not run on. So it dispatches both on the branch once the PR is open:
21
+
# `workflow_dispatch` is the one event the workflow token can start.
16
22
17
23
name: Prepare Python Release
18
24
@@ -32,6 +38,8 @@ jobs:
32
38
permissions:
33
39
contents: write
34
40
pull-requests: write
41
+
# To dispatch the TypeScript and Python workflows on the PR's branch.
42
+
actions: write
35
43
steps:
36
44
# The ref this was dispatched on becomes the PR's base, and every PR
37
45
# targets `v2/main`. A run from `main` would open a version PR straight
@@ -100,7 +108,7 @@ jobs:
100
108
echo "Generated by the **Prepare Python Release** workflow. Nothing is published until a maintainer publishes a GitHub Release."
101
109
echo
102
110
echo "> [!NOTE]"
103
-
echo "> A PR opened with the workflow token does not trigger CI. Close and reopen this PR to run it."
111
+
echo "> A push made with the workflow token starts no CI, so the workflow dispatched the TypeScript and Python workflows on this branch. Their checks report on the head commit. To run them again: \`gh workflow run python.yml --ref $BRANCH\` (and \`typescript.yml\`)."
104
112
} > "$RUNNER_TEMP/pr-body.md"
105
113
# A second run on the same day force-updates the branch, and may
106
114
# stamp a different set of packages; the open PR's body is rewritten
@@ -117,3 +125,9 @@ jobs:
117
125
--title "chore: stamp Python CalVer versions for $DATE" \
118
126
--body-file "$RUNNER_TEMP/pr-body.md"
119
127
fi
128
+
# The push above starts no workflow (see the header), so CI is
129
+
# dispatched on the branch explicitly, after a first run and a rerun
Copy file name to clipboardExpand all lines: RELEASING.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -39,7 +39,7 @@ node scripts/prepare-python-release.mjs # prints one "name: old -> new" line
39
39
### PRs opened by these workflows
40
40
41
41
> [!NOTE]
42
-
> Both workflows open their PRwith the workflow token, and GitHub does not start CI for a PR opened that way. Close and reopen the PR to run CI before merging. The Version Packages PR's body is rewritten on every push to `v2/main`, so it is tied to the release issue by a comment (`Part of #N`) instead of a body line. The repository setting **Settings → Actions → General → Allow GitHub Actions to create and approve pull requests** must be on, or the workflows fail at the step that opens the PR.
42
+
> Both workflows push their PR's branch with the workflow token, and a push made with that token starts no workflow, so each one then dispatches the TypeScript and Python workflows on that branch (`workflow_dispatch` is the one event the token can start). Their checks report on the PR's head commit; wait for them to pass before merging. Closing and reopening the PR does not start them: that fires `pull_request`, and those workflows run on `push`. To run them again by hand: `gh workflow run typescript.yml --ref <branch>` (and `python.yml`). The Version Packages PR's body is rewritten on every push to `v2/main`, so it is tied to the release issue by a comment (`Part of #N`) instead of a body line. The repository setting **Settings → Actions → General → Allow GitHub Actions to create and approve pull requests** must be on, or the workflows fail at the step that opens the PR.
0 commit comments