From e1b00171af0c7c28d5ed2d49fccdc96bc583221c Mon Sep 17 00:00:00 2001 From: Brian Jones Date: Mon, 20 Apr 2026 19:05:22 +0100 Subject: [PATCH 1/7] update actions, and dotnet version --- .github/workflows/dotnet.yml | 8 ++++---- .github/workflows/release.yml | 18 +++++++++--------- .github/workflows/sonar.yml | 8 ++++---- 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 6f1cfc9..63e551c 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -15,11 +15,11 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v6 - name: Setup .NET - uses: actions/setup-dotnet@v2 + uses: actions/setup-dotnet@v5 with: - dotnet-version: 6.0.x + dotnet-version: 9.0.x - name: Restore dependencies run: dotnet restore $solution - name: Build @@ -29,7 +29,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: name: package path: pkgs diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ebf670b..bd7c997 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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 # 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: name: nuget if-no-files-found: error @@ -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: name: nuget path: ${{ env.NuGetDirectory }} @@ -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 @@ -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. diff --git a/.github/workflows/sonar.yml b/.github/workflows/sonar.yml index 3f8df9a..df79232 100644 --- a/.github/workflows/sonar.yml +++ b/.github/workflows/sonar.yml @@ -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 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 From 163307feab8a10358139490f1f1d26604de10ac9 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 20 Apr 2026 18:20:22 +0000 Subject: [PATCH 2/7] Add global.json for .NET 9 SDK, update target frameworks to net9.0, remove explicit dotnet-version from workflows Agent-Logs-Url: https://github.com/grimley517/DecimalToSqlChecker/sessions/4972f1c7-9e47-4cbe-b2fe-9f40fecd7e44 Co-authored-by: grimley517 <1910463+grimley517@users.noreply.github.com> --- .github/workflows/dotnet.yml | 2 -- global.json | 6 ++++++ src/DecimalChecker.Tests/DecimalChecker.Tests.csproj | 2 +- src/DecimalChecker/DecimalChecker.csproj | 2 +- 4 files changed, 8 insertions(+), 4 deletions(-) create mode 100644 global.json diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 63e551c..f53d649 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -18,8 +18,6 @@ jobs: - uses: actions/checkout@v6 - name: Setup .NET uses: actions/setup-dotnet@v5 - with: - dotnet-version: 9.0.x - name: Restore dependencies run: dotnet restore $solution - name: Build diff --git a/global.json b/global.json new file mode 100644 index 0000000..cdbb589 --- /dev/null +++ b/global.json @@ -0,0 +1,6 @@ +{ + "sdk": { + "version": "9.0.100", + "rollForward": "latestFeature" + } +} diff --git a/src/DecimalChecker.Tests/DecimalChecker.Tests.csproj b/src/DecimalChecker.Tests/DecimalChecker.Tests.csproj index 3ea8e59..442c578 100644 --- a/src/DecimalChecker.Tests/DecimalChecker.Tests.csproj +++ b/src/DecimalChecker.Tests/DecimalChecker.Tests.csproj @@ -1,7 +1,7 @@ - net6.0 + net9.0 enable false diff --git a/src/DecimalChecker/DecimalChecker.csproj b/src/DecimalChecker/DecimalChecker.csproj index 5cfec49..553cb9b 100644 --- a/src/DecimalChecker/DecimalChecker.csproj +++ b/src/DecimalChecker/DecimalChecker.csproj @@ -1,7 +1,7 @@ - net6.0 + net9.0 enable enable true From edceeaebce89c9f85f21b6b3284622da404b89e3 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 20 Apr 2026 18:26:43 +0000 Subject: [PATCH 3/7] Fix PS syntax in release.yml to bash, centralize TargetFramework in Directory.Build.props Agent-Logs-Url: https://github.com/grimley517/DecimalToSqlChecker/sessions/b87fd848-b2d8-4f40-bea2-aef4d5f6c753 Co-authored-by: grimley517 <1910463+grimley517@users.noreply.github.com> --- .github/workflows/release.yml | 8 ++++---- src/DecimalChecker.Tests/DecimalChecker.Tests.csproj | 1 - src/DecimalChecker/DecimalChecker.csproj | 1 - src/Directory.Build.props | 5 +++++ 4 files changed, 9 insertions(+), 6 deletions(-) create mode 100644 src/Directory.Build.props diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index bd7c997..2770842 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -52,7 +52,7 @@ jobs: # If some rules are not applicable, you can disable them # using the --excluded-rules or --excluded-rule-ids option - name: Validate package - run: meziantou.validate-nuget-package (Get-ChildItem "${{ env.NuGetDirectory }}/*.nupkg") + run: meziantou.validate-nuget-package $(ls ${{ env.NuGetDirectory }}/*.nupkg) run_test: runs-on: ubuntu-latest @@ -86,6 +86,6 @@ jobs: # If you retry a failed workflow, already published packages will be skipped without error. - name: Publish NuGet package run: | - foreach($file in (Get-ChildItem "${{ env.NuGetDirectory }}" -Recurse -Include *.nupkg)) { - dotnet nuget push $file --api-key "${{ secrets.NUGET_TOKEN }}" --source https://api.nuget.org/v3/index.json --skip-duplicate - } + for file in ${{ env.NuGetDirectory }}/*.nupkg; do + dotnet nuget push "$file" --api-key "${{ secrets.NUGET_TOKEN }}" --source https://api.nuget.org/v3/index.json --skip-duplicate + done diff --git a/src/DecimalChecker.Tests/DecimalChecker.Tests.csproj b/src/DecimalChecker.Tests/DecimalChecker.Tests.csproj index 442c578..c9b3671 100644 --- a/src/DecimalChecker.Tests/DecimalChecker.Tests.csproj +++ b/src/DecimalChecker.Tests/DecimalChecker.Tests.csproj @@ -1,7 +1,6 @@ - net9.0 enable false diff --git a/src/DecimalChecker/DecimalChecker.csproj b/src/DecimalChecker/DecimalChecker.csproj index 553cb9b..566a2df 100644 --- a/src/DecimalChecker/DecimalChecker.csproj +++ b/src/DecimalChecker/DecimalChecker.csproj @@ -1,7 +1,6 @@ - net9.0 enable enable true diff --git a/src/Directory.Build.props b/src/Directory.Build.props new file mode 100644 index 0000000..67b2324 --- /dev/null +++ b/src/Directory.Build.props @@ -0,0 +1,5 @@ + + + net9.0 + + From 91d7cff25796cf56115ecedd0fc898b4874e87d6 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 20 Apr 2026 18:27:24 +0000 Subject: [PATCH 4/7] Quote NuGetDirectory path in bash loop to handle spaces Agent-Logs-Url: https://github.com/grimley517/DecimalToSqlChecker/sessions/b87fd848-b2d8-4f40-bea2-aef4d5f6c753 Co-authored-by: grimley517 <1910463+grimley517@users.noreply.github.com> --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2770842..a7c3893 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -86,6 +86,6 @@ jobs: # If you retry a failed workflow, already published packages will be skipped without error. - name: Publish NuGet package run: | - for file in ${{ env.NuGetDirectory }}/*.nupkg; do + for file in "${{ env.NuGetDirectory }}"/*.nupkg; do dotnet nuget push "$file" --api-key "${{ secrets.NUGET_TOKEN }}" --source https://api.nuget.org/v3/index.json --skip-duplicate done From aac315b8f06043cd4b56656032afebc62f8dc55d Mon Sep 17 00:00:00 2001 From: Brian Jones Date: Tue, 21 Apr 2026 05:47:20 +0100 Subject: [PATCH 5/7] pack not building --- .github/workflows/dotnet.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 63e551c..27adcdd 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -25,9 +25,9 @@ jobs: - name: Build run: dotnet build $solution --no-restore - name: Test - run: dotnet test $solution --no-build --verbosity normal + run: dotnet test $solution --verbosity normal - name: Pack - run: dotnet pack $solution --no-build --include-source --output pkgs + run: dotnet pack $solution --output pkgs - name: Upload Package as a Build Artifact uses: actions/upload-artifact@v7 with: From 96a06f2083aa8701567b9bb631d08b6b0bde3fef Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 21 Apr 2026 04:53:22 +0000 Subject: [PATCH 6/7] Add sonar-project.properties and fix deprecated sonar.login -> sonar.token Agent-Logs-Url: https://github.com/grimley517/DecimalToSqlChecker/sessions/cc7f1820-27c7-4af3-a745-0b88198a0075 Co-authored-by: grimley517 <1910463+grimley517@users.noreply.github.com> --- .github/workflows/sonar.yml | 4 ++-- sonar-project.properties | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) create mode 100644 sonar-project.properties diff --git a/.github/workflows/sonar.yml b/.github/workflows/sonar.yml index df79232..e38d1e4 100644 --- a/.github/workflows/sonar.yml +++ b/.github/workflows/sonar.yml @@ -49,7 +49,7 @@ jobs: SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} shell: powershell run: | - .\.sonar\scanner\dotnet-sonarscanner begin /k:"grimley517_DecimalToSqlChecker" /o:"grimley517" /d:sonar.login="${{ secrets.SONAR_TOKEN }}" /d:sonar.host.url="https://sonarcloud.io" + .\.sonar\scanner\dotnet-sonarscanner begin /k:"grimley517_DecimalToSqlChecker" /o:"grimley517" /d:sonar.token="${{ secrets.SONAR_TOKEN }}" /d:sonar.host.url="https://sonarcloud.io" dotnet build ${{ env.projectfile }} dotnet-coverage collect "dotnet test ${{ env.projectfile }}" -f xml -o "coverage.xml" - .\.sonar\scanner\dotnet-sonarscanner end /d:sonar.login="${{ secrets.SONAR_TOKEN }}" + .\.sonar\scanner\dotnet-sonarscanner end /d:sonar.token="${{ secrets.SONAR_TOKEN }}" diff --git a/sonar-project.properties b/sonar-project.properties new file mode 100644 index 0000000..53de392 --- /dev/null +++ b/sonar-project.properties @@ -0,0 +1,4 @@ +sonar.projectKey=grimley517_DecimalToSqlChecker +sonar.organization=grimley517 +sonar.host.url=https://sonarcloud.io +sonar.cs.opencover.reportsPaths=coverage.xml From 837c734b11010cd0195aa40231e0bf990deac102 Mon Sep 17 00:00:00 2001 From: Brian Jones Date: Tue, 21 Apr 2026 05:57:20 +0100 Subject: [PATCH 7/7] remove sonarqube check --- .github/workflows/sonar.yml | 55 ------------------------------------- 1 file changed, 55 deletions(-) delete mode 100644 .github/workflows/sonar.yml diff --git a/.github/workflows/sonar.yml b/.github/workflows/sonar.yml deleted file mode 100644 index df79232..0000000 --- a/.github/workflows/sonar.yml +++ /dev/null @@ -1,55 +0,0 @@ -name: SonarCloud -on: - push: - branches: - - main - pull_request: - types: [opened, synchronize, reopened] -env: - projectfile: src/DecimalChecker.sln -jobs: - build: - name: Build and analyze - runs-on: windows-latest - steps: - - name: Set up JDK 21 - uses: actions/setup-java@v5 - with: - java-version: 21 - distribution: 'zulu' # Alternative distribution options are available. - - 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@v5 - with: - path: ~\sonar\cache - key: ${{ runner.os }}-sonar - restore-keys: ${{ runner.os }}-sonar - - name: Cache SonarCloud scanner - id: cache-sonar-scanner - uses: actions/cache@v5 - with: - path: .\.sonar\scanner - key: ${{ runner.os }}-sonar-scanner - restore-keys: ${{ runner.os }}-sonar-scanner - - name: Install SonarCloud scanner - if: steps.cache-sonar-scanner.outputs.cache-hit != 'true' - shell: powershell - run: | - New-Item -Path .\.sonar\scanner -ItemType Directory - dotnet tool update dotnet-sonarscanner --tool-path .\.sonar\scanner - - name: Install dotnet-coverage - shell: powershell - run: | - dotnet tool install --global dotnet-coverage - - name: Build and analyze - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any - SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - shell: powershell - run: | - .\.sonar\scanner\dotnet-sonarscanner begin /k:"grimley517_DecimalToSqlChecker" /o:"grimley517" /d:sonar.login="${{ secrets.SONAR_TOKEN }}" /d:sonar.host.url="https://sonarcloud.io" - dotnet build ${{ env.projectfile }} - dotnet-coverage collect "dotnet test ${{ env.projectfile }}" -f xml -o "coverage.xml" - .\.sonar\scanner\dotnet-sonarscanner end /d:sonar.login="${{ secrets.SONAR_TOKEN }}"