Skip to content

Commit 7e31251

Browse files
feat(actions): add nuget trusted publishing
1 parent d82d766 commit 7e31251

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

.github/workflows/pack.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ on:
1010
jobs:
1111
pack:
1212
runs-on: ubuntu-latest
13+
permissions:
14+
id-token: write
1315

1416
steps:
1517
- uses: actions/checkout@v4
@@ -19,9 +21,15 @@ jobs:
1921
with:
2022
dotnet-version: 9.0.x
2123

24+
- name: NuGet login
25+
uses: NuGet/login@v1
26+
id: nuget-login
27+
with:
28+
user: ${{ secrets.NUGET_USER }}
29+
2230
- name: Publish to Nuget
2331
env:
24-
NUGET_API_KEY: ${{secrets.NUGET_API_KEY}}
32+
NUGET_API_KEY: ${{steps.nuget-login.outputs.NUGET_API_KEY}}
2533
Bundle: True
2634

2735
run: |

0 commit comments

Comments
 (0)