Repository navigation
ci: publish a CI run's packages from a separate workflow - #212
Merged
Merged
Conversation
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Every push to main published a v0.13.0-dev.N tag, a GitHub prerelease and twelve packages to NuGet. Nobody consumes those. Publishing now lives in publish.yml and works on a CI run that already built and tested the packages; nothing is rebuilt. - ci.yml builds, tests and packs, and publishes nothing. The packages artifact is named packages-<version> and kept 30 days. The workflow token is contents: read; checks: write moves to build-test-pack, the only job that writes a check run. - publish.yml runs on its own when CI succeeds on a push to release/** (workflow_run, filtered on release/**), and by hand for any other successful CI push run of main or release/**: gh workflow run publish.yml -f run-id=<id>. It checks the run (ci.yml of this repository, push, success, main or release/*), downloads its packages-<version> artifact, checks every package carries that version, then runs the release and NuGet steps moved from ci.yml, tagging the run's commit. - Publications run one at a time and queue (job-level concurrency, queue: max), so an unrelated CI completion cannot cancel a pending one. - GITHUB_TOKEN is given only to the steps that call gh. - The nuget environment must admit main only: workflow_run always runs main's copy, and a dispatch from another branch is then refused instead of letting that branch's copy obtain a NuGet key. docs/publishing.md and docs/architecture.md describe the new split, the environment rule and the Trusted Publishing policy, which now names publish.yml.
carldebilly
force-pushed
the
dev/cdb/publish-dev-on-demand
branch
from
November 13, 2026 02:13
861deec to
2762880
Compare
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.
Every push to
mainpublished av0.13.0-dev.Ntag, a GitHub prerelease and twelve packages to NuGet. Nobody consumes those. Publishing moves to a separate workflow that publishes the packages a CI run already built and tested, without rebuilding.Behaviour
maingh workflow run publish.yml -f run-id=<id>(id = number in the CI run's URL)release/**, successworkflow_run)release/**, failedEvery job of the CI run must succeed, not only
Build, Test, Packas before.Changes
ci.ymlbuilds, tests and packs, and publishes nothing. The artifact ispackages-<version>(30 days). The token iscontents: read;checks: writeis granted only tobuild-test-pack(test report).publish.yml(new):ci.yml, apush, a success, onmainorrelease/*;.nupkgcarries the version from the artifact's name;ci.yml, with the tag on the run's commit.queue: max), so an unrelated CI completion cannot cancel a pending one.GITHUB_TOKENis given only to the steps that callgh.docs/publishing.mdanddocs/architecture.md.Before merging (repository and NuGet settings)
publish.yml(owneryllibed, reporepl, environmentnuget). Without it the first publication fails atAuthenticate to NuGet. Remove theci.ymlpolicy oncepublish.ymlhas published.nugetenvironment: limit the deployment branches tomainonly (removerelease/*). Both paths ofpublish.ymlrun withGITHUB_REF=main. Arelease/*rule would let a modifiedpublish.ymldispatched from a release branch obtain a NuGet key without any of its checks.Verification
bash -npasses on every step, markdownlint passes. actionlint could not be run here.packages.mainby hand is the first validation, without cutting a release.