File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Publish NuGet Package to GitHub Packages
2+
3+ on :
4+ push :
5+ branches : ['release']
6+ release :
7+ types : ['published']
8+
9+ jobs :
10+ publish :
11+ runs-on : ubuntu-latest
12+ permissions :
13+ contents : read
14+ packages : write
15+ attestations : write
16+ id-token : write
17+ steps :
18+ - name : Checkout code
19+ uses : actions/checkout@v4
20+
21+ - name : Setup .NET
22+ uses : actions/setup-dotnet@v4
23+
24+ - name : Restore NuGet packages
25+ run : dotnet restore
26+
27+ - name : Build and pack NuGet package
28+ run : dotnet pack --configuration Release
29+
30+ - name : Publish NuGet package to GitHub Packages
31+ env :
32+ PACKAGES_AUTH_TOKEN : ${{ secrets.PACKAGES_AUTH_TOKEN }}
33+ OWNER : jacopouggeri
34+ run : |
35+ dotnet nuget add source --username $OWNER --password $PACKAGES_AUTH_TOKEN --store-password-in-clear-text --name github "https://nuget.pkg.github.com/${OWNER}/index.json"
36+ dotnet nuget push bin/Release/*.nupkg --api-key $PACKAGES_AUTH_TOKEN --source "github"
Original file line number Diff line number Diff line change 1- name : Publish NuGet Package
1+ name : Publish NuGet Package to NuGet.org
22
33on :
44 push :
2626
2727 - name : Build and pack NuGet package
2828 run : dotnet pack --configuration Release
29-
30- - name : Publish NuGet package to GitHub Packages
31- env :
32- PACKAGES_AUTH_TOKEN : ${{ secrets.PACKAGES_AUTH_TOKEN }}
33- OWNER : jacopouggeri
34- run : |
35- dotnet nuget add source --username $OWNER --password $PACKAGES_AUTH_TOKEN --store-password-in-clear-text --name github "https://nuget.pkg.github.com/${OWNER}/index.json"
36- dotnet nuget push bin/Release/*.nupkg --api-key $PACKAGES_AUTH_TOKEN --source "github"
37-
29+
3830 - name : Publish NuGet package to NuGet.org
3931 env :
4032 NUGET_AUTH_TOKEN : ${{ secrets.NUGET_AUTH_TOKEN }}
You can’t perform that action at this time.
0 commit comments