Skip to content

Commit 498f4c6

Browse files
committed
nuget oidc
1 parent 100d2a4 commit 498f4c6

1 file changed

Lines changed: 12 additions & 1 deletion

File tree

.github/workflows/ci.yml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ on: [push, pull_request]
55
permissions:
66
actions: write
77
contents: write
8+
id-token: write
89

910
jobs:
1011
build:
@@ -52,6 +53,10 @@ jobs:
5253
if: startsWith(github.ref, 'refs/tags/')
5354
needs: build
5455
runs-on: ubuntu-latest
56+
57+
permissions:
58+
id-token: write
59+
5560
steps:
5661
- name: Download artifacts
5762
uses: actions/download-artifact@v5
@@ -73,5 +78,11 @@ jobs:
7378
env:
7479
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
7580

81+
- name: NuGet login
82+
uses: NuGet/login@v1
83+
id: login
84+
with:
85+
user: ${{ secrets.NUGET_USER }}
86+
7687
- name: Publish to NuGet Gallery
77-
run: dotnet nuget push artifacts/ValveKeyValue.nupkg --api-key "${{ secrets.NUGET_API_KEY }}" --source "https://api.nuget.org/v3/index.json"
88+
run: dotnet nuget push artifacts/ValveKeyValue.nupkg --api-key ${{ steps.login.outputs.NUGET_API_KEY }}--source "https://api.nuget.org/v3/index.json"

0 commit comments

Comments
 (0)