Skip to content

Emit dotnet-version from GitHubActionsAttribute (SetupDotNetVersions) - #699

Draft
ChrisonSimtian wants to merge 2 commits into
Fallout-build:developfrom
ChrisonSimtian:hotfix/v10.4.1-setup-dotnet-version
Draft

ChrisonSimtian wants to merge 2 commits into
Fallout-build:developfrom
ChrisonSimtian:hotfix/v10.4.1-setup-dotnet-version

Conversation

@ChrisonSimtian

@ChrisonSimtian ChrisonSimtian commented Oct 5, 2026 •

Copy link
Copy Markdown
Collaborator

What

GitHubActionsAttribute gets a SetupDotNetVersions (string[]) property. When non-empty, the generated actions/setup-dotnet step emits dotnet-version (one value inline, several as a | block) and no global-json-file. Empty (the default) leaves the output byte for byte as before.

Why

The step always emitted global-json-file: global.json, resolved from the repo root. Repos with global.json in a subfolder either fail or need a root copy just for Fallout. Pinning an exact SDK also stops self-hosted runners that share one dotnet directory from racing to install every new patch at once ("file already exists" mid-extract on concurrent jobs).

Tests

Two new generation specs (setup-dotnet-version, setup-dotnet-versions). The existing verified workflows are untouched and still pass, which covers the unchanged default. Docs: new "Pinning the .NET SDK" section in docs/website/05-cicd/github-actions.md.

Branch

Targets develop. The branch was cut from main, so it carries only these two commits; it can be cherry-picked onto the 10.4.x line for the patch release.

@ChrisonSimtian ChrisonSimtian added the target/vCurrent Targets the current version label Oct 5, 2026
@ChrisonSimtian
ChrisonSimtian changed the base branch from main to develop October 5, 2026 00:57
ChrisonSimtian and others added 2 commits October 5, 2026 13:57
Add SetupDotNetVersions to GitHubActionsAttribute and GitHubActionsRunStep.
When non-empty the generated step writes dotnet-version (one value inline,
several as a block) instead of global-json-file. Empty keeps the existing
output unchanged.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@ChrisonSimtian
ChrisonSimtian force-pushed the hotfix/v10.4.1-setup-dotnet-version branch from 957ab75 to fc63964 Compare October 5, 2026 00:58

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

target/vCurrent Targets the current version

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant