Skip to content

Track the current majors for the actions the generator emits#533

Merged
ITaluone merged 2 commits into
Fallout-build:mainfrom
lahma:ci/setup-dotnet-v5
Jul 23, 2026
Merged

Track the current majors for the actions the generator emits#533
ITaluone merged 2 commits into
Fallout-build:mainfrom
lahma:ci/setup-dotnet-v5

Conversation

@lahma

@lahma lahma commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

The GitHub Actions generator hard-codes the action versions it emits, so a consumer can't move any of them forward — the only escape is subclassing GitHubActionsAttribute and replacing the emitted steps. This moves all three to their current majors:

Action Before After Current major released
actions/setup-dotnet v4 v6 2026-07-16
actions/checkout v6 v7 2026-06-18
actions/upload-artifact v5 v7 2026-02-26

setup-dotnet@v4 additionally runs on the node20 runtime GitHub has scheduled for removal.

Why it matters downstream

Two repos migrating off NUKE hit this:

  • Quartz.NET (quartznet/quartznet#3162) carried a custom step class purely to reach setup-dotnet@v5, because NUKE emitted no SDK setup at all. Dropped on migration, accepting @v4 as a temporary step back.
  • test262-harness-dotnet carries custom step classes today to reach checkout@v7 and upload-artifact@v7, with the stated intent of tracking action majors independently of the framework version. Those classes exist only because the generator's pins lag.

That's the argument for the generator tracking current majors: every consumer that wants them otherwise reimplements step emission, and those reimplementations then drift from the framework's own output.

Scope

  • the three emitting step classes
  • 28 Verify snapshots asserting generated YAML
  • docs/05-cicd/github-actions.md sample output
  • this repo's own workflows, including the hand-written publish-packages-* ones (the generated ones would change on the next regeneration regardless)

One checkout@v6 string remains in GitHubActionsStepPipelineSpecs — that's a user-supplied GitHubActionsCustomStep fixture, not a generator pin, so it's arbitrary sample input.

dotnet test tests/Fallout.Common.Specs — 131 passed, 0 failed.

🤖 Generated with Claude Code

actions/setup-dotnet@v4 runs on the node20 runtime, which GitHub has scheduled
for removal; v5 moves to node24 and is otherwise input-compatible, so the
generated global-json-file step is unchanged apart from the tag.

Every consumer inherits the pin from the generator, so a stale tag can only be
worked around by replacing the whole run step. Quartz.NET carried exactly that
workaround under NUKE.

Covers the generator, the 28 Verify snapshots that assert the emitted YAML, the
CI-docs sample, and this repo's own workflows (the generated ones would change
on the next regeneration anyway).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@lahma
lahma marked this pull request as ready for review July 23, 2026 08:47
@lahma
lahma requested a review from a team as a code owner July 23, 2026 08:47
@ITaluone
ITaluone requested a review from avidenic July 23, 2026 08:52
Extends the setup-dotnet bump to the other two actions the generator pins, and
carries setup-dotnet to v6 — v5 was already superseded while this PR sat open.

  setup-dotnet     v4 -> v6   (v6.0.0, 2026-07-16)
  checkout         v6 -> v7   (v7.0.0, 2026-06-18)
  upload-artifact  v5 -> v7   (v7.0.0, 2026-02-26)

Same argument as before: consumers can't move these forward without replacing
the emitted steps wholesale. test262-harness-dotnet does exactly that today —
it carries custom step classes purely to reach checkout@v7 and
upload-artifact@v7, which the generator can just emit.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@lahma lahma changed the title Bump the generated setup-dotnet step to v5 Track the current majors for the actions the generator emits Jul 23, 2026
@lahma

lahma commented Jul 23, 2026

Copy link
Copy Markdown
Contributor Author

Widened while this sat open, and the setup-dotnet target moved.

setup-dotnet@v5 was already stale. v6.0.0 shipped 2026-07-16, after this PR was opened against v5. Pushed the pin to v6 rather than landing a version that's superseded on arrival.

Added checkout and upload-artifact, the other two actions the generator pins — v6→v7 and v5→v7. Folded into this PR rather than a second one because both touch the same 28 Verify snapshots and would conflict.

Retitled accordingly; the branch name still says setup-dotnet-v5, which renaming would break the PR to fix, so it stays.

The motivating case is now concrete: test262-harness-dotnet carries custom step classes today solely to reach checkout@v7 and upload-artifact@v7. With this merged those classes delete outright.

Specs re-run: 131 passed, 0 failed.

@ITaluone

Copy link
Copy Markdown
Collaborator

Should we setup some sort of "heads-up tests"? Meaning: something that notifies us, when a new release is out..

lahma added a commit to lahma/test262-harness-dotnet that referenced this pull request Jul 23, 2026
NUKE is no longer maintained, so transitive-dependency advisories against it are
never fixed upstream — build/_build.csproj carried three pins that existed only
to route around that. Fallout is the maintained hard-fork successor.

Mechanics: `fallout-migrate` handles the Nuke.* -> Fallout.* rewrite, the MSBuild
property renames and .nuke -> .fallout. The one thing it can't is
Nuke.Common.ProjectModel, which maps to Fallout.Solutions rather than a 1:1
prefix swap.

CI shape changes with it. Fallout's generator no longer emits ./build.cmd steps —
it emits setup-dotnet + `dotnet tool restore` + `dotnet fallout`, so the CLI is
pinned in .config/dotnet-tools.json and build.ps1/build.sh are thin shims that
restore it and forward.

The setup-dotnet override goes with it: the generator emits its own step now,
driven by global.json, which already pins 10.0.100. Ours existed only because
NUKE emitted no SDK setup at all — keeping it would produce two setup-dotnet
steps per job. Note this is a step back from @v5 to Fallout's @v4 until the
upstream bump lands (Fallout-build/Fallout#533).

The checkout / upload-artifact overrides stay. Fallout pins @v6 and @v5, the same
versions NUKE did, so #162's argument is unchanged — those two custom steps are
still the only way to reach @v7. Same PR upstream retires them.

Pin cleanup, verified by restore rather than assumed:

- NuGet.Packaging and YamlDotNet dropped; Fallout's transitive versions are clean
  and neither is referenced by the build code
- System.Security.Cryptography.Xml kept; Fallout ships 10.0.6, inside the
  affected range of five advisories

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@lahma

lahma commented Jul 23, 2026

Copy link
Copy Markdown
Contributor Author

Should we setup some sort of "heads-up tests"? Meaning: something that notifies us, when a new release is out..

I think easiest option would be to allow user's to override the action name/version via attribute property, then lagging a bit behind wouldn't stop users from getting the latest by updating their build.

@ChrisonSimtian

Copy link
Copy Markdown
Collaborator

Should we setup some sort of "heads-up tests"? Meaning: something that notifies us, when a new release is out..

I think easiest option would be to allow user's to override the action name/version via attribute property, then lagging a bit behind wouldn't stop users from getting the latest by updating their build.

I agree. Should we get this one out to bump versions and at the same time open a gh issue to track this as a long-term solution?
Also, welcome to Fallout :-)

@ITaluone

Copy link
Copy Markdown
Collaborator

Should we get this one out to bump versions and at the same time open a gh issue to track this as a long-term solution?

Either one is fine, but "separation of concerns"-wise, yes :)

@ITaluone
ITaluone merged commit 8bb241f into Fallout-build:main Jul 23, 2026
2 checks passed
@lahma
lahma deleted the ci/setup-dotnet-v5 branch July 23, 2026 12:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants