Skip to content

Commit a1d1d5a

Browse files
Use trusted publishing for NuGet (#9090)
1 parent 98c8329 commit a1d1d5a

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

.github/workflows/release.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ on:
66
- "16.*"
77

88
permissions:
9-
id-token: write
109
contents: read
1110

1211
jobs:
@@ -15,6 +14,7 @@ jobs:
1514
runs-on: ubuntu-22.04
1615
permissions:
1716
contents: write
17+
id-token: write
1818

1919
steps:
2020
- name: 📦 Checkout
@@ -49,11 +49,17 @@ jobs:
4949
NitroApiClientId: ${{ secrets.NITRO_API_CLIENT_ID }}
5050
NitroApiKey: ${{ secrets.NITRO_API_KEY }}
5151

52+
- name: NuGet login
53+
uses: NuGet/login@v1
54+
id: login
55+
with:
56+
user: ${{ secrets.NUGET_USERNAME }}
57+
5258
- name: 🚀 Push Packages to NuGet
5359
run: |
5460
./build.cmd publish --skip
5561
env:
56-
NuGetApiKey: ${{ secrets.NUGETAPIKEY }}
62+
NuGetApiKey: ${{ steps.login.outputs.NUGET_API_KEY }}
5763

5864
- name: 📤 Attach .nupkg assets to GitHub release
5965
run: |

0 commit comments

Comments
 (0)