Skip to content

Commit 396e447

Browse files
API key to env
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 943c741 commit 396e447

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

.github/workflows/ci.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,5 +140,9 @@ jobs:
140140
- name: Publish NuGet package to nuget.org
141141
run: |
142142
foreach($file in (Get-ChildItem "${{ env.NuGetDirectory }}" -Recurse -Include *.nupkg, *.snupkg)) {
143-
dotnet nuget push $file --api-key "${{ secrets.NUGET_API_KEY }}" --source https://api.nuget.org/v3/index.json --skip-duplicate
143+
env:
144+
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
145+
run: |
146+
foreach($file in (Get-ChildItem "${{ env.NuGetDirectory }}" -Recurse -Include *.nupkg, *.snupkg)) {
147+
dotnet nuget push $file --source https://api.nuget.org/v3/index.json --skip-duplicate
144148
}

0 commit comments

Comments
 (0)