Skip to content

Commit 9ab7e19

Browse files
ANcpLuaclaude
andcommitted
fix: switch from OIDC to API key for NuGet publishing
NuGet Trusted Publishing requires different setup than attempted. Switched to traditional API key approach for reliability. Requires NUGET_API_KEY secret to be configured in GitHub repo settings. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent 0738064 commit 9ab7e19

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

.github/workflows/nuget-publish.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,7 @@ jobs:
4545
- name: Publish packages to NuGet.org
4646
if: github.event_name == 'release' || github.event_name == 'workflow_dispatch'
4747
run: |
48-
# Request OIDC token for NuGet Trusted Publishing
49-
OIDC_TOKEN=$(curl -sS -H "Authorization: bearer $ACTIONS_ID_TOKEN_REQUEST_TOKEN" "$ACTIONS_ID_TOKEN_REQUEST_URL" | jq -r '.value')
50-
51-
# Push package with OIDC token
5248
dotnet nuget push ./nupkg/*.nupkg \
5349
--source https://api.nuget.org/v3/index.json \
54-
--api-key "$OIDC_TOKEN" \
50+
--api-key ${{ secrets.NUGET_API_KEY }} \
5551
--skip-duplicate

0 commit comments

Comments
 (0)