Skip to content

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented Oct 16, 2025

Description

This PR updates the .github/workflows/copilot-setup-steps.yml workflow to use the global-json-file input for the actions/setup-dotnet@v5 action, instead of hardcoding the .NET SDK version directly in the workflow file.

Changes

  • Changed from explicitly specifying dotnet-version: 10.0.100-rc.1.25451.107 and dotnet-quality: preview to using global-json-file: global.json
  • Updated the step name from "Install .NET 10.x" to "Install .NET SDK" to make it version-agnostic

Benefits

  1. Single source of truth: The .NET SDK version is now centrally managed in global.json, which is already the authoritative source for the SDK version across the repository
  2. Easier maintenance: When the SDK version needs to be updated, only global.json needs to be changed, and the workflow will automatically pick up the new version
  3. Follows best practices: Aligns with the GitHub Actions setup-dotnet documentation
  4. Automatic configuration: The action will automatically respect all settings from global.json, including allowPrerelease, rollForward, and other SDK configuration options

Example

Before:

- name: Install .NET 10.x
  uses: actions/setup-dotnet@v5
  with:
    dotnet-version: |
      10.0.100-rc.1.25451.107
    dotnet-quality: preview

After:

- name: Install .NET SDK
  uses: actions/setup-dotnet@v5
  with:
    global-json-file: global.json

This ensures the workflow always uses the SDK version specified in the repository's global.json file, making version management more maintainable and consistent.

Original prompt

Please update the copilot-setup-steps.yml to use the version of the .NET SDK as specified in the repos' global.json, as described in the docs at https://github.com/actions/setup-dotnet?tab=readme-ov-file#using-the-global-json-file-input


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

@Copilot Copilot AI changed the title [WIP] Update copilot-setup-steps.yml for .NET SDK version Update copilot-setup-steps.yml to use global.json for .NET SDK version Oct 16, 2025
@Copilot Copilot AI requested a review from stephentoub October 16, 2025 19:32
Copilot finished work on behalf of stephentoub October 16, 2025 19:32
@stephentoub
Copy link
Contributor

@copilot, please run all tests in the repo.

@stephentoub stephentoub marked this pull request as ready for review October 16, 2025 19:36
@stephentoub stephentoub merged commit a918960 into main Oct 16, 2025
3 of 4 checks passed
@stephentoub stephentoub deleted the copilot/update-dotnet-sdk-version branch October 16, 2025 19:37
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.

2 participants