Skip to content
8 changes: 3 additions & 5 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,9 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v6
- name: Setup .NET
uses: actions/setup-dotnet@v2
with:
dotnet-version: 6.0.x
uses: actions/setup-dotnet@v5
- name: Restore dependencies
run: dotnet restore $solution
- name: Build
Expand All @@ -29,7 +27,7 @@ jobs:
- name: Pack
run: dotnet pack $solution --no-build --include-source --output pkgs
- name: Upload Package as a Build Artifact
uses: actions/upload-artifact@v3.1.0
uses: actions/upload-artifact@v7
with:
Comment thread
grimley517 marked this conversation as resolved.
name: package
path: pkgs
18 changes: 9 additions & 9 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,19 @@ jobs:
create_nuget:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4.1.1
- uses: actions/checkout@v6
with:
fetch-depth: 0 # Get all history to allow automatic versioning using MinVer

# Install the .NET SDK indicated in the global.json file
- name: Setup .NET
uses: actions/setup-dotnet@v4
uses: actions/setup-dotnet@v5

Comment thread
grimley517 marked this conversation as resolved.
# Create the NuGet package in the folder from the environment variable NuGetDirectory
- run: dotnet pack $PROJECT --configuration Release --output ${{ env.NuGetDirectory }}

# Publish the NuGet package as an artifact, so they can be used in the following jobs
- uses: actions/upload-artifact@v4
- uses: actions/upload-artifact@v7
with:
Comment thread
grimley517 marked this conversation as resolved.
name: nuget
if-no-files-found: error
Expand All @@ -36,10 +36,10 @@ jobs:
steps:
# Install the .NET SDK indicated in the global.json file
- name: Setup .NET
uses: actions/setup-dotnet@v4
uses: actions/setup-dotnet@v5

# Download the NuGet package created in the previous job
- uses: actions/download-artifact@v4
- uses: actions/download-artifact@v7
with:
Comment on lines 37 to 43

Copilot AI Apr 20, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Several run: steps in this workflow use PowerShell syntax (e.g., Get-ChildItem, foreach(...)), but the jobs run on ubuntu-latest and these steps don’t set shell: pwsh. Unless the shell is set, these commands will execute under bash and fail. Set defaults.run.shell: pwsh for the workflow/job, or rewrite those commands to bash equivalents.

Copilot uses AI. Check for mistakes.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot apply changes based on this feedback

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in commit 91d7cff. Converted both PowerShell steps to bash equivalents: replaced (Get-ChildItem ...) with $(ls ...) for the validate step, and replaced the foreach(...) loop with a bash for ... do ... done loop (with the path properly quoted) for the publish step.

name: nuget
path: ${{ env.NuGetDirectory }}
Expand All @@ -57,9 +57,9 @@ jobs:
run_test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
- name: Setup .NET
uses: actions/setup-dotnet@v4
uses: actions/setup-dotnet@v5
- name: Run tests
run: dotnet test $PROJECT --configuration Release

Expand All @@ -72,14 +72,14 @@ jobs:
needs: [ validate_nuget, run_test ]
steps:
# Download the NuGet package created in the previous job
- uses: actions/download-artifact@v4
- uses: actions/download-artifact@v7
with:
name: nuget
path: ${{ env.NuGetDirectory }}

# Install the .NET SDK indicated in the global.json file
- name: Setup .NET Core
uses: actions/setup-dotnet@v4
uses: actions/setup-dotnet@v5

# Publish all NuGet packages to NuGet.org
# Use --skip-duplicate to prevent errors if a package with the same version already exists.
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/sonar.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,22 @@ jobs:
runs-on: windows-latest
steps:
- name: Set up JDK 21
uses: actions/setup-java@v4.1.0
uses: actions/setup-java@v5
with:
java-version: 21
distribution: 'zulu' # Alternative distribution options are available.
- uses: actions/checkout@v4.1.1
- uses: actions/checkout@v6
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- name: Cache SonarCloud packages
uses: actions/cache@v4.0.1
uses: actions/cache@v5
Comment thread
grimley517 marked this conversation as resolved.
Outdated
with:
path: ~\sonar\cache
key: ${{ runner.os }}-sonar
restore-keys: ${{ runner.os }}-sonar
- name: Cache SonarCloud scanner
id: cache-sonar-scanner
uses: actions/cache@v4.0.1
uses: actions/cache@v5
with:
path: .\.sonar\scanner
key: ${{ runner.os }}-sonar-scanner
Expand Down
6 changes: 6 additions & 0 deletions global.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"sdk": {
"version": "9.0.100",
"rollForward": "latestFeature"
}
}
2 changes: 1 addition & 1 deletion src/DecimalChecker.Tests/DecimalChecker.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<Nullable>enable</Nullable>

<IsPackable>false</IsPackable>
Expand Down
2 changes: 1 addition & 1 deletion src/DecimalChecker/DecimalChecker.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<PackOnBuild>true</PackOnBuild>
Expand Down
Loading