File tree Expand file tree Collapse file tree 1 file changed +34
-0
lines changed
Expand file tree Collapse file tree 1 file changed +34
-0
lines changed Original file line number Diff line number Diff line change 5050 - name : Push to GitHub Packages
5151 if : github.event_name == 'push' && startsWith(github.repository, 'khellang/')
5252 run : dotnet nuget push ./artifacts/*.*nupkg --source https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json --api-key ${{ secrets.GITHUB_TOKEN }} --skip-duplicate
53+
54+ publish :
55+ runs-on : ubuntu-latest
56+ needs : build
57+ if : github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') && startsWith(github.repository, 'khellang/')
58+ permissions :
59+ id-token : write
60+ contents : read
61+
62+ env :
63+ DOTNET_SKIP_FIRST_TIME_EXPERIENCE : 1
64+ DOTNET_CLI_TELEMETRY_OPTOUT : 1
65+ DOTNET_NOLOGO : true
66+
67+ steps :
68+ - name : Download NuGet package artifact
69+ uses : actions/download-artifact@v4
70+ with :
71+ name : nuget-packages
72+ path : ./artifacts
73+
74+ - name : Setup .NET 10 SDK
75+ uses : actions/setup-dotnet@v4
76+ with :
77+ dotnet-version : " 10.x"
78+
79+ - name : Authenticate to NuGet.org with OIDC
80+ uses : NuGet/login@v1
81+ with :
82+ name : nuget.org
83+ service-endpoint : https://api.nuget.org/v3/index.json
84+
85+ - name : Push to NuGet.org
86+ run : dotnet nuget push ./artifacts/*.nupkg --source https://api.nuget.org/v3/index.json --skip-duplicate
You can’t perform that action at this time.
0 commit comments