Skip to content

Commit 242a2df

Browse files
authored
Refactor NuGet publish to use OIDC for API key
Updated NuGet publish workflow to use OIDC for authentication.
1 parent e19e0ac commit 242a2df

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

.github/workflows/publish-nuget.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,12 +63,18 @@ jobs:
6363
6464
- name: List artifacts
6565
run: ls -la ./artifacts
66+
67+
- name: NuGet login (OIDC → temp API key)
68+
uses: NuGet/login@v1
69+
id: login
70+
with:
71+
user: makutamiserix
6672

6773
- name: Publish to NuGet.org
6874
run: |
6975
dotnet nuget push ./artifacts/*.nupkg \
70-
--api-key ${{ secrets.NUGET_API_KEY }} \
71-
--source ${{ env.NUGET_SOURCE }} \
76+
--api-key ${{steps.login.outputs.NUGET_API_KEY}} \
77+
--source https://api.nuget.org/v3/index.json \
7278
--skip-duplicate
7379
7480
- name: Upload artifacts

0 commit comments

Comments
 (0)