Skip to content

Commit 7daebd5

Browse files
committed
Use Nuget's Trusted Publishing.
1 parent 9cb5e73 commit 7daebd5

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

.github/workflows/release.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,16 @@ jobs:
1111
release:
1212
runs-on: ubuntu-latest
1313

14-
# TODO: Switch to trusted publishing in future
1514
permissions:
1615
id-token: write
1716

1817
steps:
1918
- uses: actions/checkout@v4
19+
- name: NuGet login (OIDC → temp API key)
20+
uses: NuGet/login@v1
21+
id: login
22+
with:
23+
user: ${{ secrets.NUGET_USER }}
2024
- name: Extract version from tag
2125
id: get_version
2226
run: |
@@ -40,4 +44,4 @@ jobs:
4044
- name: Publish the package to nuget.org
4145
run: dotnet nuget push */bin/Release/*.nupkg -k $NUGET_AUTH_TOKEN -s https://api.nuget.org/v3/index.json
4246
env:
43-
NUGET_AUTH_TOKEN: ${{ secrets.NUGET_TOKEN }}
47+
NUGET_AUTH_TOKEN: ${{ steps.login.outputs.NUGET_API_KEY }}

0 commit comments

Comments
 (0)