Skip to content

Commit 78f3dc9

Browse files
committed
ci: nuget trusted publishing
1 parent c40298e commit 78f3dc9

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

.github/workflows/part-publish.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,14 @@ jobs:
3939
- name: Download all workflow run artifacts
4040
uses: actions/download-artifact@v5
4141

42+
- name: NuGet login (OIDC → temp API key)
43+
uses: NuGet/login@v1
44+
id: login
45+
with:
46+
user: ascott18
47+
4248
- name: dotnet nuget push
43-
run: dotnet nuget push "**/*.nupkg" -s https://api.nuget.org/v3/index.json --api-key ${{ secrets.NUGET_TOKEN }}
49+
run: dotnet nuget push "**/*.nupkg" -s https://api.nuget.org/v3/index.json --api-key ${{ steps.login.outputs.NUGET_API_KEY }}
4450

4551
docs:
4652
runs-on: ubuntu-latest

.github/workflows/release.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,5 +65,11 @@ jobs:
6565
with:
6666
name: template-packages
6767

68+
- name: NuGet login (OIDC → temp API key)
69+
uses: NuGet/login@v1
70+
id: login
71+
with:
72+
user: ascott18
73+
6874
- name: dotnet nuget push
69-
run: dotnet nuget push "**/*.nupkg" -s https://api.nuget.org/v3/index.json --api-key ${{ secrets.NUGET_TOKEN }}
75+
run: dotnet nuget push "**/*.nupkg" -s https://api.nuget.org/v3/index.json --api-key ${{ steps.login.outputs.NUGET_API_KEY }}

0 commit comments

Comments
 (0)