From 3a1afb8175c14a040249912a1c43b34ae404c093 Mon Sep 17 00:00:00 2001 From: konard Date: Fri, 12 Sep 2025 20:18:57 +0300 Subject: [PATCH 01/12] Initial commit with task details for issue #142 Adding CLAUDE.md with task information for AI processing. This file will be removed when the task is complete. Issue: https://github.com/linksplatform/Interfaces/issues/142 --- CLAUDE.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 CLAUDE.md diff --git a/CLAUDE.md b/CLAUDE.md new file mode 100644 index 00000000..3c440076 --- /dev/null +++ b/CLAUDE.md @@ -0,0 +1,5 @@ +Issue to solve: https://github.com/linksplatform/Interfaces/issues/142 +Your prepared branch: issue-142-b15af30d +Your prepared working directory: /tmp/gh-issue-solver-1757697530449 + +Proceed. \ No newline at end of file From e7039a597d72f83fc203ab8b9879ecc1c081546f Mon Sep 17 00:00:00 2001 From: konard Date: Fri, 12 Sep 2025 20:25:56 +0300 Subject: [PATCH 02/12] Fix C# workflow NU5017 packaging error MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Remove conflicting DebugType=embedded setting that prevented symbol package creation - Symbol packages now generate successfully with snupkg format - Update release notes to reflect the fix 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- csharp/Platform.Interfaces/Platform.Interfaces.csproj | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/csharp/Platform.Interfaces/Platform.Interfaces.csproj b/csharp/Platform.Interfaces/Platform.Interfaces.csproj index e4208009..94b76335 100644 --- a/csharp/Platform.Interfaces/Platform.Interfaces.csproj +++ b/csharp/Platform.Interfaces/Platform.Interfaces.csproj @@ -22,9 +22,8 @@ true true snupkg - embedded latest - Add embedded symbols support for GitHub Package Registry debugging. + Fix NU5017 packaging error by removing conflicting DebugType setting. enable From b332b2c61828dc812e53bdfe7eb969b6d524b146 Mon Sep 17 00:00:00 2001 From: konard Date: Fri, 12 Sep 2025 20:26:39 +0300 Subject: [PATCH 03/12] Remove CLAUDE.md - Claude command completed --- CLAUDE.md | 5 ----- 1 file changed, 5 deletions(-) delete mode 100644 CLAUDE.md diff --git a/CLAUDE.md b/CLAUDE.md deleted file mode 100644 index 3c440076..00000000 --- a/CLAUDE.md +++ /dev/null @@ -1,5 +0,0 @@ -Issue to solve: https://github.com/linksplatform/Interfaces/issues/142 -Your prepared branch: issue-142-b15af30d -Your prepared working directory: /tmp/gh-issue-solver-1757697530449 - -Proceed. \ No newline at end of file From d9deb9ffe02e7592b4fb2322b5235c37259f8bba Mon Sep 17 00:00:00 2001 From: konard Date: Wed, 16 Sep 2026 17:26:04 +0000 Subject: [PATCH 04/12] Add C# package regression validation --- .github/scripts/validate-csharp-package.sh | 47 ++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100755 .github/scripts/validate-csharp-package.sh diff --git a/.github/scripts/validate-csharp-package.sh b/.github/scripts/validate-csharp-package.sh new file mode 100755 index 00000000..4ed9d9ac --- /dev/null +++ b/.github/scripts/validate-csharp-package.sh @@ -0,0 +1,47 @@ +#!/usr/bin/env bash + +set -euo pipefail + +repository_root=$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd) +solution="$repository_root/csharp/Platform.Interfaces.sln" +test_project="$repository_root/csharp/Platform.Interfaces.Tests/Platform.Interfaces.Tests.csproj" +package_project="$repository_root/csharp/Platform.Interfaces/Platform.Interfaces.csproj" +package_output=$(mktemp -d) + +cleanup() { + rm -rf "$package_output" +} +trap cleanup EXIT + +dotnet restore "$solution" --nologo +dotnet build "$solution" --configuration Release --no-restore --no-incremental --nologo -warnaserror +dotnet test "$test_project" --configuration Release --framework net8 --no-build --no-restore --nologo +dotnet pack "$package_project" --configuration Release --no-build --no-restore \ + --include-symbols --output "$package_output" --nologo -warnaserror + +mapfile -t packages < <(find "$package_output" -maxdepth 1 -type f -name '*.nupkg' -print) +mapfile -t symbol_packages < <(find "$package_output" -maxdepth 1 -type f -name '*.snupkg' -print) + +if [[ ${#packages[@]} -ne 1 ]]; then + echo "Expected one .nupkg, found ${#packages[@]}." >&2 + exit 1 +fi + +if [[ ${#symbol_packages[@]} -ne 1 ]]; then + echo "Expected one .snupkg, found ${#symbol_packages[@]}." >&2 + exit 1 +fi + +for expected_file in README.md icon.png lib/net8/Platform.Interfaces.dll; do + if ! unzip -Z1 "${packages[0]}" | grep -Fxq "$expected_file"; then + echo "${packages[0]} is missing $expected_file." >&2 + exit 1 + fi +done + +if ! unzip -Z1 "${symbol_packages[0]}" | grep -Fxq 'lib/net8/Platform.Interfaces.pdb'; then + echo "${symbol_packages[0]} is missing lib/net8/Platform.Interfaces.pdb." >&2 + exit 1 +fi + +echo "Validated ${packages[0]} and ${symbol_packages[0]}." From a8a2b6df4830c3b02009473ea9db376b43751688 Mon Sep 17 00:00:00 2001 From: konard Date: Fri, 12 Sep 2025 20:24:04 +0300 Subject: [PATCH 05/12] Fix all warnings in C# workflow MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Fixed CS8600 null warnings in InterfacesTests.cs by making interface variables nullable - Fixed deprecated set-output command warning by using GITHUB_OUTPUT environment file - Fixed NU5048 PackageIconUrl deprecation warning by switching to modern PackageIcon with local icon file - Updated all actions/checkout from v1/v3 to v4 for consistency - Fixed typos in workflow job names (pusnToNuget -> pushToNuget, publiseRelease -> publishRelease) 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- .github/workflows/csharp.yml | 20 +++++++++--------- .../InterfacesTests.cs | 20 +++++++++--------- .../Platform.Interfaces.csproj | 6 +++++- csharp/Platform.Interfaces/icon.png | Bin 0 -> 6569 bytes 4 files changed, 25 insertions(+), 21 deletions(-) create mode 100644 csharp/Platform.Interfaces/icon.png diff --git a/.github/workflows/csharp.yml b/.github/workflows/csharp.yml index a5b414de..48657b6a 100644 --- a/.github/workflows/csharp.yml +++ b/.github/workflows/csharp.yml @@ -24,7 +24,7 @@ jobs: with: dotnet-version: '8.0.x' - - uses: actions/checkout@v1 + - uses: actions/checkout@v4 with: submodules: true - name: Test @@ -39,7 +39,7 @@ jobs: with: dotnet-version: '8.0.x' - - uses: actions/checkout@v1 + - uses: actions/checkout@v4 with: submodules: true - name: Publish NuGet package to GitHub Package Registry @@ -48,7 +48,7 @@ jobs: dotnet pack -c Release --include-symbols dotnet nuget add source https://nuget.pkg.github.com/linksplatform/index.json --name GitHub --username linksplatform --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text dotnet nuget push **/*.nupkg --source GitHub --skip-duplicate - pusnToNuget: + pushToNuget: runs-on: ubuntu-latest needs: test steps: @@ -57,7 +57,7 @@ jobs: with: dotnet-version: '8.0.x' - - uses: actions/checkout@v1 + - uses: actions/checkout@v4 with: submodules: true - name: Read project information @@ -70,7 +70,7 @@ jobs: export REPOSITORY_NAME=$(basename ${{ github.repository }}) wget "$SCRIPTS_BASE_URL/push-csharp-nuget.sh" bash ./push-csharp-nuget.sh - publiseRelease: + publishRelease: runs-on: ubuntu-latest needs: test steps: @@ -79,7 +79,7 @@ jobs: with: dotnet-version: '8.0.x' - - uses: actions/checkout@v1 + - uses: actions/checkout@v4 with: submodules: true - name: Read project information @@ -106,7 +106,7 @@ jobs: with: dotnet-version: '8.0.x' - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 0 - name: Get changed files using defaults @@ -124,7 +124,7 @@ jobs: isCsFilesChanged='true' fi done - echo "::set-output name=isCsFilesChanged::${isCsFilesChanged}" + echo "isCsFilesChanged=${isCsFilesChanged}" >> $GITHUB_OUTPUT echo "isCsFilesChanged: ${isCsFilesChanged}" generatePdfWithCode: runs-on: ubuntu-latest @@ -136,7 +136,7 @@ jobs: with: dotnet-version: '8.0.x' - - uses: actions/checkout@v1 + - uses: actions/checkout@v4 with: submodules: true - name: Generate PDF with code @@ -156,7 +156,7 @@ jobs: with: dotnet-version: '8.0.x' - - uses: actions/checkout@v1 + - uses: actions/checkout@v4 with: submodules: true - name: Publish documentation to gh-pages branch diff --git a/csharp/Platform.Interfaces.Tests/InterfacesTests.cs b/csharp/Platform.Interfaces.Tests/InterfacesTests.cs index ecd9b4d1..28739cdd 100644 --- a/csharp/Platform.Interfaces.Tests/InterfacesTests.cs +++ b/csharp/Platform.Interfaces.Tests/InterfacesTests.cs @@ -10,16 +10,16 @@ public static class InterfacesTests [Fact] public static void BuildTest() { - ICounter c1 = null; - ICounter c2 = null; - ICriterionMatcher cm1 = null; - IFactory f1 = null; - IProperties p1 = null; - IProperty p2 = null; - IProvider p3 = null; - IProvider p4 = null; - ISetter s1 = null; - ISetter s2 = null; + ICounter? c1 = null; + ICounter? c2 = null; + ICriterionMatcher? cm1 = null; + IFactory? f1 = null; + IProperties? p1 = null; + IProperty? p2 = null; + IProvider? p3 = null; + IProvider? p4 = null; + ISetter? s1 = null; + ISetter? s2 = null; } } } diff --git a/csharp/Platform.Interfaces/Platform.Interfaces.csproj b/csharp/Platform.Interfaces/Platform.Interfaces.csproj index 94b76335..1e466f53 100644 --- a/csharp/Platform.Interfaces/Platform.Interfaces.csproj +++ b/csharp/Platform.Interfaces/Platform.Interfaces.csproj @@ -10,7 +10,7 @@ Platform.Interfaces Platform.Interfaces LinksPlatform;Interfaces;ICounter;ICriterionMatcher;IFactory;IProperties;IProperty;IProvider;ISetter - https://raw.githubusercontent.com/linksplatform/Documentation/18469f4d033ee9a5b7b84caab9c585acab2ac519/doc/Avatar-rainbow-icon-64x64.png + icon.png https://linksplatform.github.io/Interfaces Unlicense git @@ -35,4 +35,8 @@ + + + + diff --git a/csharp/Platform.Interfaces/icon.png b/csharp/Platform.Interfaces/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..c1ad0cac5d8e94045982ba35f38e0a265f25f408 GIT binary patch literal 6569 zcmV;a8CK?rP) zaB^>EX>4U6ba`-PAZ2)IW&i+q+U=TacI3Eng#Tj|UIN~a<=}aaci`pw3y@N)ds=ht zzT+3HP9rRJ8i}Pd7W<$90yQq()+*e#kNMpEP%lsDp2YDRz+xV@vbFWA~rya%)-ZbZl_;JxK z*W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3X^q3w0^1E~XBJJTOuLlxXL@oGN)$AV~;gdNL#kdSqrcqO0p=00tNgeeimJMRxYL z@Ou9YXLhezh0=~YSnKP$k&cH$XE*_vn3i^*fQxtT$o79o0{J{(s$w@RY=5atYMNL81|ZZB z@G~pxJF3+|-wep1Zu(sQfI|9_#~M`;O%Q3EcmPNQX3TI9XlFrzN2;r<8*RR|R;o*~ zOP(oK-dxtm%5duoJAlDR&`}ikQ=_3|&bu5?X__CJZPo2dHe|0@b3HrV@njAxY)&rY zzNPr zgM%>_0eTj_J@||JZJfX5O=(BM|K%uj<*eNfruqgV!rl;5r7(zT8s_*xkrk{R@fm(G zYnFi`bu`~w&mCzo1Hj6ft)R$!&iZO}LFtDFA|+*0B(y~&`}XtkTmZOWEdH0c3=Yq(JuGXRXx-va Date: Wed, 16 Sep 2026 17:28:26 +0000 Subject: [PATCH 06/12] Prepare warning-free C# package release --- .github/scripts/validate-csharp-package.sh | 6 +++--- csharp/Platform.Interfaces/Platform.Interfaces.csproj | 6 ++++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/scripts/validate-csharp-package.sh b/.github/scripts/validate-csharp-package.sh index 4ed9d9ac..f6fdad3b 100755 --- a/.github/scripts/validate-csharp-package.sh +++ b/.github/scripts/validate-csharp-package.sh @@ -32,15 +32,15 @@ if [[ ${#symbol_packages[@]} -ne 1 ]]; then exit 1 fi -for expected_file in README.md icon.png lib/net8/Platform.Interfaces.dll; do +for expected_file in README.md icon.png lib/net8.0/Platform.Interfaces.dll; do if ! unzip -Z1 "${packages[0]}" | grep -Fxq "$expected_file"; then echo "${packages[0]} is missing $expected_file." >&2 exit 1 fi done -if ! unzip -Z1 "${symbol_packages[0]}" | grep -Fxq 'lib/net8/Platform.Interfaces.pdb'; then - echo "${symbol_packages[0]} is missing lib/net8/Platform.Interfaces.pdb." >&2 +if ! unzip -Z1 "${symbol_packages[0]}" | grep -Fxq 'lib/net8.0/Platform.Interfaces.pdb'; then + echo "${symbol_packages[0]} is missing lib/net8.0/Platform.Interfaces.pdb." >&2 exit 1 fi diff --git a/csharp/Platform.Interfaces/Platform.Interfaces.csproj b/csharp/Platform.Interfaces/Platform.Interfaces.csproj index 1e466f53..a92a1577 100644 --- a/csharp/Platform.Interfaces/Platform.Interfaces.csproj +++ b/csharp/Platform.Interfaces/Platform.Interfaces.csproj @@ -4,12 +4,13 @@ LinksPlatform's Platform.Interfaces Class Library Konstantin Diachenko Platform.Interfaces - 0.5.1 + 0.5.2 Konstantin Diachenko net8 Platform.Interfaces Platform.Interfaces LinksPlatform;Interfaces;ICounter;ICriterionMatcher;IFactory;IProperties;IProperty;IProvider;ISetter + README.md icon.png https://linksplatform.github.io/Interfaces Unlicense @@ -23,7 +24,7 @@ true snupkg latest - Fix NU5017 packaging error by removing conflicting DebugType setting. + Fix package and symbol publishing, eliminate C# workflow warnings, and validate NuGet artifacts before release. enable @@ -36,6 +37,7 @@ + From 13ea4cb418271ecf666274d72e85032f85d77f57 Mon Sep 17 00:00:00 2001 From: konard Date: Wed, 16 Sep 2026 17:30:53 +0000 Subject: [PATCH 07/12] Test that C# packages retain embedded symbols --- .../Platform.Interfaces.Tests/InterfacesTests.cs | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/csharp/Platform.Interfaces.Tests/InterfacesTests.cs b/csharp/Platform.Interfaces.Tests/InterfacesTests.cs index 28739cdd..f4124bb6 100644 --- a/csharp/Platform.Interfaces.Tests/InterfacesTests.cs +++ b/csharp/Platform.Interfaces.Tests/InterfacesTests.cs @@ -1,4 +1,6 @@ -using Xunit; +using System.IO; +using System.Reflection.PortableExecutable; +using Xunit; #pragma warning disable CS0168 // Variable is declared but never used #pragma warning disable CS0219 // Variable is assigned but its value is never used @@ -21,5 +23,16 @@ public static void BuildTest() ISetter? s1 = null; ISetter? s2 = null; } + + [Fact] + public static void AssemblyContainsEmbeddedPortablePdb() + { + using var assembly = File.OpenRead(typeof(ICounter<>).Assembly.Location); + using var peReader = new PEReader(assembly); + + Assert.Contains( + peReader.ReadDebugDirectory(), + entry => entry.Type == DebugDirectoryEntryType.EmbeddedPortablePdb); + } } } From 15a57e2eb4499a9735cea842061073059181b22f Mon Sep 17 00:00:00 2001 From: konard Date: Wed, 16 Sep 2026 17:31:44 +0000 Subject: [PATCH 08/12] Preserve embedded symbols without empty symbol package --- .github/scripts/validate-csharp-package.sh | 13 ++++--------- .../Platform.Interfaces/Platform.Interfaces.csproj | 5 ++--- 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/.github/scripts/validate-csharp-package.sh b/.github/scripts/validate-csharp-package.sh index f6fdad3b..d255b703 100755 --- a/.github/scripts/validate-csharp-package.sh +++ b/.github/scripts/validate-csharp-package.sh @@ -17,7 +17,7 @@ dotnet restore "$solution" --nologo dotnet build "$solution" --configuration Release --no-restore --no-incremental --nologo -warnaserror dotnet test "$test_project" --configuration Release --framework net8 --no-build --no-restore --nologo dotnet pack "$package_project" --configuration Release --no-build --no-restore \ - --include-symbols --output "$package_output" --nologo -warnaserror + --output "$package_output" --nologo -warnaserror mapfile -t packages < <(find "$package_output" -maxdepth 1 -type f -name '*.nupkg' -print) mapfile -t symbol_packages < <(find "$package_output" -maxdepth 1 -type f -name '*.snupkg' -print) @@ -27,8 +27,8 @@ if [[ ${#packages[@]} -ne 1 ]]; then exit 1 fi -if [[ ${#symbol_packages[@]} -ne 1 ]]; then - echo "Expected one .snupkg, found ${#symbol_packages[@]}." >&2 +if [[ ${#symbol_packages[@]} -ne 0 ]]; then + echo "Expected embedded symbols instead of a separate .snupkg." >&2 exit 1 fi @@ -39,9 +39,4 @@ for expected_file in README.md icon.png lib/net8.0/Platform.Interfaces.dll; do fi done -if ! unzip -Z1 "${symbol_packages[0]}" | grep -Fxq 'lib/net8.0/Platform.Interfaces.pdb'; then - echo "${symbol_packages[0]} is missing lib/net8.0/Platform.Interfaces.pdb." >&2 - exit 1 -fi - -echo "Validated ${packages[0]} and ${symbol_packages[0]}." +echo "Validated ${packages[0]} with embedded symbols." diff --git a/csharp/Platform.Interfaces/Platform.Interfaces.csproj b/csharp/Platform.Interfaces/Platform.Interfaces.csproj index a92a1577..375a9b54 100644 --- a/csharp/Platform.Interfaces/Platform.Interfaces.csproj +++ b/csharp/Platform.Interfaces/Platform.Interfaces.csproj @@ -21,10 +21,9 @@ true true true - true - snupkg + embedded latest - Fix package and symbol publishing, eliminate C# workflow warnings, and validate NuGet artifacts before release. + Fix package publishing while preserving embedded symbols, eliminate C# workflow warnings, and validate NuGet artifacts before release. enable From eb4efef87ef198cd4c5abe61de93b0d152d902fc Mon Sep 17 00:00:00 2001 From: konard Date: Wed, 16 Sep 2026 17:33:34 +0000 Subject: [PATCH 09/12] Validate C# packages before publishing releases --- .github/workflows/csharp.yml | 87 +++++++++++++++++++++++++----------- 1 file changed, 62 insertions(+), 25 deletions(-) diff --git a/.github/workflows/csharp.yml b/.github/workflows/csharp.yml index 48657b6a..8041f5e2 100644 --- a/.github/workflows/csharp.yml +++ b/.github/workflows/csharp.yml @@ -2,15 +2,26 @@ name: csharp on: push: - branches: main + branches: main paths: - 'csharp/**' + - 'README.md' + - '.github/scripts/validate-csharp-package.sh' - '.github/workflows/csharp.yml' + pull_request: + branches: main + paths: + - 'csharp/**' + - 'README.md' + - '.github/scripts/validate-csharp-package.sh' + - '.github/workflows/csharp.yml' + +permissions: + contents: read + env: - NUGETTOKEN: ${{ secrets.NUGET_TOKEN }} - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} SCRIPTS_BASE_URL: https://raw.githubusercontent.com/linksplatform/Scripts/main/MultiProjectRepository - + defaults: run: working-directory: csharp @@ -18,6 +29,7 @@ defaults: jobs: test: runs-on: ubuntu-latest + timeout-minutes: 10 steps: - name: Setup .NET uses: actions/setup-dotnet@v4 @@ -27,12 +39,17 @@ jobs: - uses: actions/checkout@v4 with: submodules: true - - name: Test - run: | - dotnet test -c Release -f net8 + - name: Validate tests and NuGet package + run: ../.github/scripts/validate-csharp-package.sh + pushNuGetPackageToGitHubPackageRegistry: needs: test + if: ${{ github.event_name == 'push' }} runs-on: ubuntu-latest + timeout-minutes: 10 + permissions: + contents: read + packages: write steps: - name: Setup .NET uses: actions/setup-dotnet@v4 @@ -43,14 +60,19 @@ jobs: with: submodules: true - name: Publish NuGet package to GitHub Package Registry + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | - dotnet build -c Release - dotnet pack -c Release --include-symbols - dotnet nuget add source https://nuget.pkg.github.com/linksplatform/index.json --name GitHub --username linksplatform --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text - dotnet nuget push **/*.nupkg --source GitHub --skip-duplicate + package_output="$RUNNER_TEMP/github-packages" + dotnet pack Platform.Interfaces/Platform.Interfaces.csproj -c Release --output "$package_output" -warnaserror + dotnet nuget add source https://nuget.pkg.github.com/linksplatform/index.json --name GitHub --username linksplatform --password "$GITHUB_TOKEN" --store-password-in-clear-text + dotnet nuget push "$package_output"/*.nupkg --source GitHub --skip-duplicate + pushToNuget: - runs-on: ubuntu-latest needs: test + if: ${{ github.event_name == 'push' }} + runs-on: ubuntu-latest + timeout-minutes: 10 steps: - name: Setup .NET uses: actions/setup-dotnet@v4 @@ -66,13 +88,20 @@ jobs: wget "$SCRIPTS_BASE_URL/read_csharp_package_info.sh" bash ./read_csharp_package_info.sh - name: Publish NuGet package + env: + NUGETTOKEN: ${{ secrets.NUGET_TOKEN }} run: | export REPOSITORY_NAME=$(basename ${{ github.repository }}) wget "$SCRIPTS_BASE_URL/push-csharp-nuget.sh" bash ./push-csharp-nuget.sh + publishRelease: + needs: [pushNuGetPackageToGitHubPackageRegistry, pushToNuget] + if: ${{ github.event_name == 'push' }} runs-on: ubuntu-latest - needs: test + timeout-minutes: 10 + permissions: + contents: write steps: - name: Setup .NET uses: actions/setup-dotnet@v4 @@ -83,29 +112,29 @@ jobs: with: submodules: true - name: Read project information - if: ${{ github.event_name == 'push' }} run: | export REPOSITORY_NAME=$(basename ${{ github.repository }}) wget "$SCRIPTS_BASE_URL/read_csharp_package_info.sh" bash ./read_csharp_package_info.sh - name: Publish release + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | export REPOSITORY_NAME=$(basename ${{ github.repository }}) + export CSHARP_PACKAGE_VERSION="$(> $GITHUB_OUTPUT + echo "isCsFilesChanged=${isCsFilesChanged}" >> "$GITHUB_OUTPUT" echo "isCsFilesChanged: ${isCsFilesChanged}" + generatePdfWithCode: - runs-on: ubuntu-latest needs: [findChangedCsFiles] - if: ${{ needs.findChangedCsFiles.outputs.isCsFilesChanged == 'true' }} + if: ${{ github.event_name == 'push' && needs.findChangedCsFiles.outputs.isCsFilesChanged == 'true' }} + runs-on: ubuntu-latest + timeout-minutes: 30 steps: - name: Setup .NET uses: actions/setup-dotnet@v4 @@ -146,10 +177,14 @@ jobs: wget "$SCRIPTS_BASE_URL/format-csharp-document.sh" wget "$SCRIPTS_BASE_URL/generate-csharp-pdf.sh" bash ./generate-csharp-pdf.sh + publishDocumentation: - runs-on: ubuntu-latest needs: [findChangedCsFiles] - if: ${{ needs.findChangedCsFiles.outputs.isCsFilesChanged == 'true' }} + if: ${{ github.event_name == 'push' && needs.findChangedCsFiles.outputs.isCsFilesChanged == 'true' }} + runs-on: ubuntu-latest + timeout-minutes: 30 + permissions: + contents: write steps: - name: Setup .NET uses: actions/setup-dotnet@v4 @@ -160,6 +195,8 @@ jobs: with: submodules: true - name: Publish documentation to gh-pages branch + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | export REPOSITORY_NAME=$(basename ${{ github.repository }}) wget "$SCRIPTS_BASE_URL/docfx.json" From 15ec99e2eb1c21ddbb59e8c2b39bcd546b9ac56b Mon Sep 17 00:00:00 2001 From: konard Date: Wed, 16 Sep 2026 17:38:14 +0000 Subject: [PATCH 10/12] Stop suppressing C# test warnings --- .../Platform.Interfaces.Tests/InterfacesTests.cs | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/csharp/Platform.Interfaces.Tests/InterfacesTests.cs b/csharp/Platform.Interfaces.Tests/InterfacesTests.cs index f4124bb6..212f4af2 100644 --- a/csharp/Platform.Interfaces.Tests/InterfacesTests.cs +++ b/csharp/Platform.Interfaces.Tests/InterfacesTests.cs @@ -2,9 +2,6 @@ using System.Reflection.PortableExecutable; using Xunit; -#pragma warning disable CS0168 // Variable is declared but never used -#pragma warning disable CS0219 // Variable is assigned but its value is never used - namespace Platform.Interfaces.Tests { public static class InterfacesTests @@ -22,6 +19,17 @@ public static void BuildTest() IProvider? p4 = null; ISetter? s1 = null; ISetter? s2 = null; + + Assert.Null(c1); + Assert.Null(c2); + Assert.Null(cm1); + Assert.Null(f1); + Assert.Null(p1); + Assert.Null(p2); + Assert.Null(p3); + Assert.Null(p4); + Assert.Null(s1); + Assert.Null(s2); } [Fact] From 865200201756e98cba413b50a92ae81d7fd70c6e Mon Sep 17 00:00:00 2001 From: konard Date: Wed, 16 Sep 2026 17:38:24 +0000 Subject: [PATCH 11/12] Eliminate deprecated CI action warnings --- .github/workflows/AutoMerge.yml | 3 ++- .github/workflows/csharp.yml | 26 +++++++++++++------------- .github/workflows/readme-badges.yml | 6 +++--- 3 files changed, 18 insertions(+), 17 deletions(-) diff --git a/.github/workflows/AutoMerge.yml b/.github/workflows/AutoMerge.yml index d5c5e0c3..71f387e3 100644 --- a/.github/workflows/AutoMerge.yml +++ b/.github/workflows/AutoMerge.yml @@ -5,9 +5,10 @@ on: jobs: auto-merge: + if: ${{ github.actor == 'dependabot[bot]' }} runs-on: ubuntu-latest + timeout-minutes: 5 steps: - - uses: actions/checkout@v2 - uses: ahmadnassri/action-dependabot-auto-merge@v2 with: target: minor diff --git a/.github/workflows/csharp.yml b/.github/workflows/csharp.yml index 8041f5e2..cef8a360 100644 --- a/.github/workflows/csharp.yml +++ b/.github/workflows/csharp.yml @@ -32,11 +32,11 @@ jobs: timeout-minutes: 10 steps: - name: Setup .NET - uses: actions/setup-dotnet@v4 + uses: actions/setup-dotnet@v6 with: dotnet-version: '8.0.x' - - uses: actions/checkout@v4 + - uses: actions/checkout@v7 with: submodules: true - name: Validate tests and NuGet package @@ -52,11 +52,11 @@ jobs: packages: write steps: - name: Setup .NET - uses: actions/setup-dotnet@v4 + uses: actions/setup-dotnet@v6 with: dotnet-version: '8.0.x' - - uses: actions/checkout@v4 + - uses: actions/checkout@v7 with: submodules: true - name: Publish NuGet package to GitHub Package Registry @@ -75,11 +75,11 @@ jobs: timeout-minutes: 10 steps: - name: Setup .NET - uses: actions/setup-dotnet@v4 + uses: actions/setup-dotnet@v6 with: dotnet-version: '8.0.x' - - uses: actions/checkout@v4 + - uses: actions/checkout@v7 with: submodules: true - name: Read project information @@ -104,11 +104,11 @@ jobs: contents: write steps: - name: Setup .NET - uses: actions/setup-dotnet@v4 + uses: actions/setup-dotnet@v6 with: dotnet-version: '8.0.x' - - uses: actions/checkout@v4 + - uses: actions/checkout@v7 with: submodules: true - name: Read project information @@ -135,7 +135,7 @@ jobs: outputs: isCsFilesChanged: ${{ steps.setIsCsFilesChangedOutput.outputs.isCsFilesChanged }} steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v7 with: fetch-depth: 0 - name: Get changed files using defaults @@ -163,11 +163,11 @@ jobs: timeout-minutes: 30 steps: - name: Setup .NET - uses: actions/setup-dotnet@v4 + uses: actions/setup-dotnet@v6 with: dotnet-version: '8.0.x' - - uses: actions/checkout@v4 + - uses: actions/checkout@v7 with: submodules: true - name: Generate PDF with code @@ -187,11 +187,11 @@ jobs: contents: write steps: - name: Setup .NET - uses: actions/setup-dotnet@v4 + uses: actions/setup-dotnet@v6 with: dotnet-version: '8.0.x' - - uses: actions/checkout@v4 + - uses: actions/checkout@v7 with: submodules: true - name: Publish documentation to gh-pages branch diff --git a/.github/workflows/readme-badges.yml b/.github/workflows/readme-badges.yml index 250c511b..df4664d0 100644 --- a/.github/workflows/readme-badges.yml +++ b/.github/workflows/readme-badges.yml @@ -20,10 +20,10 @@ jobs: runs-on: ubuntu-latest timeout-minutes: 5 steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 + - uses: actions/checkout@v7 + - uses: actions/setup-node@v7 with: - node-version: '20' + node-version: '24' - name: Test the badge check run: node --test .github/scripts/check-readme-badges.test.mjs - name: Check that README badges reference existing workflows From 72e434b695ede775b1d208db40ce1a01e603608a Mon Sep 17 00:00:00 2001 From: konard Date: Wed, 16 Sep 2026 17:45:06 +0000 Subject: [PATCH 12/12] Make C# release packing warning-strict --- .github/workflows/csharp.yml | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/.github/workflows/csharp.yml b/.github/workflows/csharp.yml index cef8a360..29f45feb 100644 --- a/.github/workflows/csharp.yml +++ b/.github/workflows/csharp.yml @@ -82,18 +82,13 @@ jobs: - uses: actions/checkout@v7 with: submodules: true - - name: Read project information - run: | - export REPOSITORY_NAME=$(basename ${{ github.repository }}) - wget "$SCRIPTS_BASE_URL/read_csharp_package_info.sh" - bash ./read_csharp_package_info.sh - name: Publish NuGet package env: NUGETTOKEN: ${{ secrets.NUGET_TOKEN }} run: | - export REPOSITORY_NAME=$(basename ${{ github.repository }}) - wget "$SCRIPTS_BASE_URL/push-csharp-nuget.sh" - bash ./push-csharp-nuget.sh + package_output="$RUNNER_TEMP/nuget-packages" + dotnet pack Platform.Interfaces/Platform.Interfaces.csproj -c Release --output "$package_output" -warnaserror + dotnet nuget push "$package_output"/*.nupkg --source https://api.nuget.org/v3/index.json --api-key "$NUGETTOKEN" --skip-duplicate publishRelease: needs: [pushNuGetPackageToGitHubPackageRegistry, pushToNuget] @@ -140,7 +135,7 @@ jobs: fetch-depth: 0 - name: Get changed files using defaults id: changed-files - uses: tj-actions/changed-files@v46 + uses: tj-actions/changed-files@v47 - name: Set output isCsFilesChanged id: setIsCsFilesChangedOutput run: |