Repository navigation
ci(release): open sponsord's decdn bump PR after publishing crates - #2399
Merged
Merged
Conversation
publish-crates.sh ends by running `gh workflow run bump-decdn.yml -R decdn/sponsord --ref main`. That workflow (decdn/sponsord) waits for crates.io to serve the release and opens the PR that pins sponsord to it. A failed start prints the command and leaves the exit code at 0, like the rest of the post-publish section. A DECDN_REPO other than decdn/decdn starts nothing, and DECDN_SKIP_SPONSORD_BUMP=1 skips it. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
There was a problem hiding this comment.
🟡 Changes recommended
The skip flag incorrectly treats false non-empty values such as 0 as enabled.
1 open finding
What changed in this PR
Adds automatic triggering of sponsord’s dependency-bump workflow after publishing deCDN crates.
Changes:
- Triggers
bump-decdn.ymlafter publication. - Supports fork and explicit-skip safeguards.
- Documents the workflow and recovery behavior.
| File | Description |
|---|---|
.github/scripts/publish-crates.sh |
Adds downstream workflow dispatch. |
RELEASING.md |
Documents the automated bump process. |
CHANGELOG.md |
Records the release automation change. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
A bare [[ -n ]] test made DECDN_SKIP_SPONSORD_BUMP=0 skip the sponsord bump. The flag now uses sign-release.sh's rule: 1/true/yes enable, 0/false/no/empty do not, anything else stops the script. It is parsed before the upload, so a typo never fails the post-publish section. Co-Authored-By: Claude Opus 5.5 <[email protected]>
4 of 5 tasks
sponsord opens its decdn bump PR from a local script now, not from a workflow with a GitHub App token. publish-crates.sh clones decdn/sponsord into a temporary directory and runs `open-decdn-bump.sh <tag>`, with the maintainer's gh login and cargo. Exit 3 (crates.io does not serve the release yet) and any other failure print the command to run later from a sponsord checkout; the publish still exits 0. The clone goes in the EXIT trap's cleanup. Co-Authored-By: Claude Opus 5.5 <[email protected]>
publish-crates.sh runs sponsord's open-decdn-bump.sh from a fresh clone of its main, as the maintainer. That script needs gh and cargo, not the crates.io token, so the subshell unsets CARGO_REGISTRY_TOKEN and every CARGO_REGISTRIES_*_TOKEN before running it. The comment and RELEASING.md state the trust this step extends to sponsord's main, and that DECDN_SKIP_SPONSORD_BUMP=1 leaves the run to a reviewed checkout. Co-Authored-By: Claude Opus 5.5 <[email protected]>
- WORKTREE and SPONSORD_DIR start empty before the EXIT trap. An inherited SPONSORD_DIR was rm -rf'd on any exit before the bump step, and an inherited WORKTREE was passed to `git worktree remove --force`. - A failed `mktemp -d` warns instead of exiting 1 after the publish. - Ctrl-C while sponsord's script waits for crates.io stops that script only. This shell traps INT around it, prints the command to run later and exits 0. - A clone without an executable open-decdn-bump.sh gets its own warning. Exit 1 tells the operator to look for "==> Opened <url>": the PR may be open with a lock that needs work, where a re-run does nothing. - Comments and RELEASING.md describe the step as it is: org admins can bypass sponsord's ruleset, only the cargo registry tokens are unset, the crates.io wait is bounded, only DECDN_REPO marks a fork, and the push uses git credentials (Python 3.11+ and a credential helper over https). Co-Authored-By: Claude Opus 5.5 <[email protected]>
5 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
publish-crates.shnow ends by opening the PR that pins decdn/sponsord to the release it just published. It clones sponsord into a temporary directory and runs.github/scripts/open-decdn-bump.sh <tag>(decdn/sponsord#56), using the maintainer'sghlogin, git identity and cargo. No GitHub App or extra secret is needed, and the PR runs CI normally.DECDN_REPOother thandecdn/decdnopens nothing.DECDN_SKIP_SPONSORD_BUMP=1/true/yesskips it, using the same check assign-release.sh. That flag is read before any upload.Merge decdn/sponsord#56 first. Until then the clone has no
open-decdn-bump.sh; the script warns and still exits 0 (tested).Test plan
bash -nand shellcheck cleanset -euo pipefailwith a stubghthat clones a fake script, in seven cases: success, script exit 1, exit 3, script missing, clone failure, skip flag, forkedREPO. Every case exits 0, prints the right line, and removes the clone.'',0,falseandnorun the bump;1,TRUEandyesskip it; a typo stops the script before any upload.🤖 Generated with Claude Code