From 970d0f4ae76de0d3ff0a8aaaccdc4466d91ed0e4 Mon Sep 17 00:00:00 2001 From: jburnett Date: Tue, 24 Nov 2026 12:27:54 -0500 Subject: [PATCH 01/10] Use GH repo secret for NuGet login --- .github/workflows/dotnet-core.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/dotnet-core.yml b/.github/workflows/dotnet-core.yml index 80f014e..6af235a 100644 --- a/.github/workflows/dotnet-core.yml +++ b/.github/workflows/dotnet-core.yml @@ -75,17 +75,17 @@ jobs: esac done - - name: Log in to nuget.org - id: login + - name: NuGet login (OIDC → temp API key) uses: NuGet/login@v1 + id: login with: - user: ${{ vars.NUGET_USER }} # the nuget.org profile name that owns the Trusted Publishing policy + user: ${{ secrets.NUGET_USER }} # the nuget.org profile name that owns the Trusted Publishing policy - uses: actions/setup-dotnet@v6 with: dotnet-version: 10.0.x - - name: Push + - name: Push NuGet packages run: > dotnet nuget push "artifacts/*.nupkg" --api-key "${{ steps.login.outputs.NUGET_API_KEY }}" From 87eb595702d23059375c854761428e628a7d55e0 Mon Sep 17 00:00:00 2001 From: jburnett Date: Tue, 24 Nov 2026 12:36:04 -0500 Subject: [PATCH 02/10] verify publish after fixing GH secret value casing --- .github/workflows/dotnet-core.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dotnet-core.yml b/.github/workflows/dotnet-core.yml index 6af235a..786100e 100644 --- a/.github/workflows/dotnet-core.yml +++ b/.github/workflows/dotnet-core.yml @@ -79,7 +79,7 @@ jobs: uses: NuGet/login@v1 id: login with: - user: ${{ secrets.NUGET_USER }} # the nuget.org profile name that owns the Trusted Publishing policy + user: ${{ secrets.NUGET_USER }} # the nuget.org profile name that owns the Trusted Publishing policy - uses: actions/setup-dotnet@v6 with: From 2e18644f97e8b5ecb041a97d21a0327b16b2df70 Mon Sep 17 00:00:00 2001 From: jburnett Date: Tue, 24 Nov 2026 13:46:46 -0500 Subject: [PATCH 03/10] ren workflow to match NuGet policy; remove separate publish workflow --- .../{dotnet-core.yml => dotnet-cicd.yml} | 0 .github/workflows/publish-nuget.yml | 50 ------------------- 2 files changed, 50 deletions(-) rename .github/workflows/{dotnet-core.yml => dotnet-cicd.yml} (100%) delete mode 100644 .github/workflows/publish-nuget.yml diff --git a/.github/workflows/dotnet-core.yml b/.github/workflows/dotnet-cicd.yml similarity index 100% rename from .github/workflows/dotnet-core.yml rename to .github/workflows/dotnet-cicd.yml diff --git a/.github/workflows/publish-nuget.yml b/.github/workflows/publish-nuget.yml deleted file mode 100644 index 9cfb349..0000000 --- a/.github/workflows/publish-nuget.yml +++ /dev/null @@ -1,50 +0,0 @@ -name: Publish NuGet Package - -on: - push: - tags: - - 'v*' - -jobs: - build-and-publish: - permissions: - id-token: write # enable GitHub OIDC token issuance for this job - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v7 - - - name: Setup .NET 10.0 - uses: actions/setup-dotnet@v6 - with: - dotnet-version: 10.0.* - - - name: Install dependencies - run: dotnet restore - - - name: Build - run: dotnet build --configuration Release --no-restore - - - name: Test - run: | - dotnet test --configuration Release --no-restore --verbosity normal ./Test.AMT.Extensions.System/Test.AMT.Extensions.System.csproj - dotnet test --configuration Release --no-restore --verbosity normal ./Test.AMT.Extensions.Linq/Test.AMT.Extensions.Linq.csproj - # NOTE: does not test /Test.AMT.Extensions.Logging at GitHub b/c fails w/IP port comms. - - - name: Pack - run: dotnet pack ./netcore-extensions.slnx --configuration Release --no-build --output artifacts - # building the slnx should build a package per csproj with IsPackable=true - - - # Get a short-lived NuGet API key - - name: NuGet login (OIDC → temp API key) - uses: NuGet/login@v1 - id: login - with: - user: ${{ secrets.NUGET_USER_NAME }} # nuget.org username (profile name), NOT your email address - - # Push the package - - name: NuGet push - run: | - dotnet nuget push artifacts/*.nupkg --api-key ${{steps.login.outputs.NUGET_API_KEY}} --source https://api.nuget.org/v3/index.json \ No newline at end of file From 78e795d0936836b12a97b126a8549c322be8a986 Mon Sep 17 00:00:00 2001 From: jburnett Date: Tue, 24 Nov 2026 13:55:15 -0500 Subject: [PATCH 04/10] Publish using NuGet staging --- .github/workflows/dotnet-cicd.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dotnet-cicd.yml b/.github/workflows/dotnet-cicd.yml index 786100e..a76cda0 100644 --- a/.github/workflows/dotnet-cicd.yml +++ b/.github/workflows/dotnet-cicd.yml @@ -87,7 +87,7 @@ jobs: - name: Push NuGet packages run: > - dotnet nuget push "artifacts/*.nupkg" + dotnet nuget stage push "artifacts/*.nupkg" --api-key "${{ steps.login.outputs.NUGET_API_KEY }}" --source https://api.nuget.org/v3/index.json --skip-duplicate \ No newline at end of file From c6b73029a8d2d53ca0c3f249a0770e59202080ee Mon Sep 17 00:00:00 2001 From: jburnett Date: Tue, 24 Nov 2026 14:15:21 -0500 Subject: [PATCH 05/10] fix staging cmd in cicd --- .github/workflows/dotnet-cicd.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dotnet-cicd.yml b/.github/workflows/dotnet-cicd.yml index a76cda0..ad19554 100644 --- a/.github/workflows/dotnet-cicd.yml +++ b/.github/workflows/dotnet-cicd.yml @@ -87,7 +87,7 @@ jobs: - name: Push NuGet packages run: > - dotnet nuget stage push "artifacts/*.nupkg" + dotnet package stage push "artifacts/*.nupkg" --api-key "${{ steps.login.outputs.NUGET_API_KEY }}" --source https://api.nuget.org/v3/index.json --skip-duplicate \ No newline at end of file From 16b5f2c91ddc571380a89fa48dddc20e67902bf6 Mon Sep 17 00:00:00 2001 From: jburnett Date: Tue, 24 Nov 2026 14:17:42 -0500 Subject: [PATCH 06/10] rm skip-duplicate (! supported for staging) --- .github/workflows/dotnet-cicd.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/dotnet-cicd.yml b/.github/workflows/dotnet-cicd.yml index ad19554..014b644 100644 --- a/.github/workflows/dotnet-cicd.yml +++ b/.github/workflows/dotnet-cicd.yml @@ -90,4 +90,3 @@ jobs: dotnet package stage push "artifacts/*.nupkg" --api-key "${{ steps.login.outputs.NUGET_API_KEY }}" --source https://api.nuget.org/v3/index.json - --skip-duplicate \ No newline at end of file From c136c5063c2995a5513a923993b6b1efd22138d7 Mon Sep 17 00:00:00 2001 From: jburnett Date: Tue, 24 Nov 2026 14:37:43 -0500 Subject: [PATCH 07/10] Use .NET 11 in publish step for staging support --- .github/workflows/dotnet-cicd.yml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/dotnet-cicd.yml b/.github/workflows/dotnet-cicd.yml index 014b644..885c0f6 100644 --- a/.github/workflows/dotnet-cicd.yml +++ b/.github/workflows/dotnet-cicd.yml @@ -44,8 +44,9 @@ jobs: if: matrix.os == 'ubuntu-latest' uses: actions/upload-artifact@v7 with: - name: packages - path: artifacts/ + name: nuget-packages + path: artifacts/*.nupkg + retention-days: 2 if-no-files-found: error # Publishes the packages built above to nuget.org on v* tags, with a short-lived key from @@ -62,8 +63,8 @@ jobs: - name: Download packages uses: actions/download-artifact@v8 with: - name: packages - path: artifacts + name: nuget-packages + path: artifacts/*.nupkg - name: Check package versions match the tag run: | @@ -81,9 +82,10 @@ jobs: with: user: ${{ secrets.NUGET_USER }} # the nuget.org profile name that owns the Trusted Publishing policy + # Use .NET 11 to get nuget staging support - uses: actions/setup-dotnet@v6 with: - dotnet-version: 10.0.x + dotnet-version: 11.0.x - name: Push NuGet packages run: > From e94d0479ddfb0c4fae608f4332811bfd1d2f2ee8 Mon Sep 17 00:00:00 2001 From: jburnett Date: Tue, 24 Nov 2026 14:44:45 -0500 Subject: [PATCH 08/10] rm *.nupkg from download path; echo version when verifying pkg names --- .github/workflows/dotnet-cicd.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/dotnet-cicd.yml b/.github/workflows/dotnet-cicd.yml index 885c0f6..558eef7 100644 --- a/.github/workflows/dotnet-cicd.yml +++ b/.github/workflows/dotnet-cicd.yml @@ -64,11 +64,12 @@ jobs: uses: actions/download-artifact@v8 with: name: nuget-packages - path: artifacts/*.nupkg + path: artifacts - - name: Check package versions match the tag + - name: Verify the package versions match the tag run: | version="${GITHUB_REF_NAME#v}" + echo "version: $version" for package in artifacts/*.nupkg; do case "$package" in *".$version.nupkg") ;; From 55a23666a5a6fa5819c5287b89a9592e7f9001d9 Mon Sep 17 00:00:00 2001 From: jburnett Date: Tue, 24 Nov 2026 15:41:06 -0500 Subject: [PATCH 09/10] iterate and stage nupkgs --- .github/workflows/dotnet-cicd.yml | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/.github/workflows/dotnet-cicd.yml b/.github/workflows/dotnet-cicd.yml index 558eef7..ebfc41b 100644 --- a/.github/workflows/dotnet-cicd.yml +++ b/.github/workflows/dotnet-cicd.yml @@ -89,7 +89,14 @@ jobs: dotnet-version: 11.0.x - name: Push NuGet packages - run: > - dotnet package stage push "artifacts/*.nupkg" - --api-key "${{ steps.login.outputs.NUGET_API_KEY }}" - --source https://api.nuget.org/v3/index.json + run: | + for package in artifacts/*.nupkg; do + dotnet package stage push "$package" \ + --api-key "${{ steps.login.outputs.NUGET_API_KEY }}" \ + --source https://api.nuget.org/v3/index.json + done + + # run: > + # dotnet package stage push "artifacts/AMT.Extensions.Linq.nupkg" + # --api-key "${{ steps.login.outputs.NUGET_API_KEY }}" + # --source https://api.nuget.org/v3/index.json From 9a83be18c367b075a3e7a254eb5547bccad77ae5 Mon Sep 17 00:00:00 2001 From: jburnett Date: Tue, 24 Nov 2026 16:02:44 -0500 Subject: [PATCH 10/10] Specify staging group when pushing package to nuget --- .github/workflows/dotnet-cicd.yml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.github/workflows/dotnet-cicd.yml b/.github/workflows/dotnet-cicd.yml index ebfc41b..f3229ab 100644 --- a/.github/workflows/dotnet-cicd.yml +++ b/.github/workflows/dotnet-cicd.yml @@ -93,10 +93,6 @@ jobs: for package in artifacts/*.nupkg; do dotnet package stage push "$package" \ --api-key "${{ steps.login.outputs.NUGET_API_KEY }}" \ + --group netcore-extensions \ --source https://api.nuget.org/v3/index.json done - - # run: > - # dotnet package stage push "artifacts/AMT.Extensions.Linq.nupkg" - # --api-key "${{ steps.login.outputs.NUGET_API_KEY }}" - # --source https://api.nuget.org/v3/index.json