Skip to content

Release: run the full CI before publishing, and a nightly full run - #132

Merged
CaffeinatedCoder merged 2 commits into
mainfrom
chore/111-full-ci-before-release
Oct 20, 2026
Merged

CaffeinatedCoder merged 2 commits into
mainfrom
chore/111-full-ci-before-release

Conversation

@CaffeinatedCoder

Copy link
Copy Markdown
Owner

Closes #111

Stacked on #129 (#110). It needs the CI gate, so that a skipped or cancelled lane also stops a release. Merge #129 first. Until then this PR targets chore/110-ci-gate, so dotnet.yml does not run on it. The proof runs below were dispatched instead.

Problem

release.yml's verify job ran its own build and tests and trusted that the tagged commit had passed every PR check. That trust fails for a tag on a commit whose push run failed, and once lanes can be skipped (#112). Some CI inputs also change without any diff: the SDK (dotnet-version: 10.0.x), the postgres:18, postgres:16 and mssql/server:2022-latest images, and the smoke test's nuget.org restore. Nothing runs CI unless something is pushed, and a fixes-only release/5.x will see weeks without a push.

Change

  • dotnet.yml gains on: workflow_call. Its concurrency group gets a dotnet- prefix. In a called workflow github.workflow is the caller's name, so without the prefix the group could equal the caller's own and the two would deadlock. Each integration job now writes the digests of the container images it used to its job summary.
  • release.yml gains a ci job (uses: ./.github/workflows/dotnet.yml, contents: read). verify needs it, so every lane runs on the tagged commit, SQL Server included, and the CI gate decides before anything is packed or approved. The Trusted Publishing structure is unchanged: verify → publish (id-token: write, nuget environment) → release (contents: write). No job holds both permissions. verify keeps its own test step, so the artifact published is the artifact tested.
  • nightly.yml (new) runs at 03:17 UTC and on demand.
    • default-branch calls dotnet.yml.
    • release-lines dispatches dotnet.yml on each branch in RELEASE_LINES that exists. That is release/5.x, skipped with a notice until the cut. Each branch is tested by its own workflow and SDK; after the cut that matters, because main moves to .NET 11. The job waits on the run id the dispatch API returns (return_run_details).
    • report needs both, runs always(), and on any result except success opens an issue titled "Nightly CI failed" (chore, area/release), or comments on the open one.
  • global.json (new): 10.0.400, rollForward: latestPatch, allowPrerelease: false. Every job that checks out the repository sets up .NET from it. publish keeps dotnet-version, since it has no checkout and only pushes.
  • test/consumer-smoke-test.sh: copies global.json into the throwaway directory, because the consumer projects live outside the repository where the file does not reach. It also restores Microsoft.EntityFrameworkCore.Design as 10.*, as dotnet-ef already was.
  • Guards:
    • ReleaseWiringConventionTests: publish must depend through needs on a job that calls dotnet.yml, dotnet.yml must keep workflow_call, and no if: on that path may use a status function.
    • CiInputConventionTests (new): the SDK pin, and the nightly's schedule, call and report.
    • CLAUDE.md describes all of this.

No changelog line: nothing a consumer receives changes.

Decisions

  • Notification: an issue, not GitHub's email. GitHub emails a failed scheduled run only to the user who last edited the cron line, and only if their notification settings allow it. The runs dispatched on release/5.x have github-actions[bot] as their actor, so their failures email nobody. An issue reaches whoever watches the repository, stays open until someone acts, and collects one comment per failed night instead of a new issue each time.
  • SDK: 10.0.400 + latestPatch. This is the band CI already ran (10.0.x resolved to 10.0.402), and your local 10.0.402 satisfies it. Patches, including security fixes, arrive on their own. A new feature band changes the compiler and NuGet, so it needs a PR that edits global.json. The 4xx band is .NET 10's last and is serviced to EOL, so the pin should hold for the life of the 5.x line. One side effect: inside the repository, a machine with only the 11.0 RC SDK no longer builds with it.
  • Images stay floating. postgres:18, postgres:16 and 2022-latest float within their version on purpose, as a consumer's server does. A digest pin would need an update path, and Dependabot's docker ecosystem cannot read an image name in C#. Without one, a pin would freeze the tests on a server nobody runs. The nightly catches a new image within a day, and the recorded digests show what changed against the last green run.
  • nuget.org restore stays, held to the line. The real time bomb was the unversioned Microsoft.EntityFrameworkCore.Design. The day EF Core 11 ships, nuget.org's latest becomes a net11.0 package, which this net10.0 consumer refuses. That would have broken release/5.x's smoke test with no diff.
  • Limit: GitHub turns off schedules in a public repository after 60 days without activity. The release does not depend on the nightly, because release.yml runs the full CI itself.

Tests

Proof runs (the proof branches are deleted afterwards):

Run What it shows
Release dry run on this branch CI / … lanes run (Test, PostgreSQL 18, SQL Server 2022, Consumer, Pack, gate) before Verify and pack. Verify and pack success; Publish and GitHub release skipped (dry run).
Release dry run, consumer lane seeded exit 1 CI / CI failure → Verify and pack, Publish and GitHub release all skipped
Nightly, a release line seeded to fail default branch green. release/5.x skipped with a notice. The dispatched run on the seeded branch (run) failed, Release lines failed, and Report a failure opened #130 (closed as a proof)
Nightly, every part green default branch green; release/5.x skipped; the dispatched run on this branch (run) green; Report a failure succeeded without opening an issue

Guards: each seed below fails its test, and every one was restored afterwards.

  • ReleaseWiringConventionTests: needs: ci removed from verify; the ci job removed; always() && added to publish's condition; if: ${{ !cancelled() }} added to verify; workflow_call removed from dotnet.yml.
  • CiInputConventionTests: one lane back on dotnet-version: 10.0.x; rollForward: latestFeature; report without always(); release-lines missing from report's needs; nightly no longer calling dotnet.yml.

Unit suite: 495 passed. consumer-smoke-test.sh passed locally with the pinned SDK (10.0.402) and the 10.* Design reference.

🤖 Generated with Claude Code

)

dotnet.yml becomes a reusable workflow. release.yml calls it in a `ci`
job that `verify` needs, so every lane, SQL Server included, runs on the
tagged commit and its `CI` gate decides before anything is packed or
approved. The Trusted Publishing split (verify -> publish -> release) is
unchanged. dotnet.yml's concurrency group gains a prefix so a caller's
group can never equal it.

nightly.yml calls dotnet.yml on the default branch every night and
dispatches it on each release line that exists (release/5.x after the
cut), waiting for the result. A failure opens or comments on a "Nightly
CI failed" issue.

The SDK is pinned by global.json (10.0.400, latestPatch). The integration
jobs record the image digests they used. The consumer smoke test holds
EF Core Design to 10.* and builds with the repository's global.json.

ReleaseWiringConventionTests holds that publish depends on the full CI;
CiInputConventionTests holds the SDK pin and the nightly's report.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@CaffeinatedCoder CaffeinatedCoder added this to the 5.5.0 milestone Oct 20, 2026
@CaffeinatedCoder CaffeinatedCoder added chore Build, CI, packaging, refactoring with no behaviour change stacked Base is another open PR; merge in order, CI does not run until it targets main area/release Versioning, changelogs, release wiring labels Oct 20, 2026
@CaffeinatedCoder
CaffeinatedCoder changed the base branch from chore/110-ci-gate to main October 20, 2026 08:56
@CaffeinatedCoder
CaffeinatedCoder merged commit 0cc50e6 into main Oct 20, 2026
@CaffeinatedCoder
CaffeinatedCoder deleted the chore/111-full-ci-before-release branch October 20, 2026 09:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/release Versioning, changelogs, release wiring chore Build, CI, packaging, refactoring with no behaviour change stacked Base is another open PR; merge in order, CI does not run until it targets main

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Release: run the full CI before publishing, and a nightly full run

1 participant