Skip to content

Commit 3bef561

Browse files
authored
Update nuget-publish.yml
1 parent 8fef312 commit 3bef561

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

.github/workflows/nuget-publish.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
name: Publish a NuGet package
22

3-
on: [push]
3+
on:
4+
push:
5+
branches:
6+
- main
47

58
env:
69
# Path to the solution file relative to the root of the project.
@@ -34,7 +37,7 @@ jobs:
3437
run: nuget pack
3538

3639
- name: Authenticate to GitHub packages
37-
run: dotnet nuget add source --username jaccz --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text --name pict "https://nuget.pkg.github.com/microsoft/index.json"
38-
40+
run: dotnet nuget add source --password ${{ secrets.NUGET_API_KEY }} --name pict "https://nuget.pkg.github.com/microsoft/index.json"
41+
3942
- name: Publish the package
40-
run: dotnet nuget push "Microsoft.Test.Pict.*.nupkg" --api-key ${{ secrets.GITHUB_TOKEN }} --source "pict" --skip-duplicate
43+
run: dotnet nuget push "Microsoft.Test.Pict.*.nupkg" --api-key ${{ secrets.NUGET_API_KEY }} --source "pict" --skip-duplicate

0 commit comments

Comments
 (0)