From e0bdec432a9320933614bd4049a5d6eba3a1bbb2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20Wei=C3=9F?= Date: Sat, 25 Jul 2026 21:19:03 +0200 Subject: [PATCH] Add environment: production to publish job for trusted publishing The nuget.org trusted publishing policy was created with Environment set to "production", which means the OIDC token issued to the job must carry a matching environment claim. Without an `environment:` key on the job, GitHub doesn't include that claim, so nuget.org's token exchange fails with 401 "No matching trust policy owned by user" even with a correct NUGET_USER value. Co-Authored-By: Claude Sonnet 5 --- .github/workflows/publish-pipeline.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/publish-pipeline.yml b/.github/workflows/publish-pipeline.yml index 2064ae3..951afe2 100644 --- a/.github/workflows/publish-pipeline.yml +++ b/.github/workflows/publish-pipeline.yml @@ -28,6 +28,7 @@ jobs: name: 'Build and publish package' needs: test-pipeline runs-on: ubuntu-latest + environment: production steps: - uses: actions/checkout@v3 - name: 'RenameVersionTag'