File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1010jobs :
1111 build :
1212 runs-on : windows-latest
13+ permissions :
14+ id-token : write
15+ contents : read
1316
1417 steps :
1518 - uses : actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # v2
6467 - name : Pack MerQure.Tools
6568 run : dotnet pack src\MerQure.Tools\MerQure.Tools.csproj --configuration Release -o artifacts -p:PackageVersion=${{ steps.gitversion.outputs.nuGetVersionV2 }}
6669
67- - name : Nuget org push
68- if : startsWith(github.ref, 'refs/tags/')
69- run : dotnet nuget push "artifacts/**/*.nupkg" --skip-duplicate --source https://api.nuget.org/v3/index.json -k ${{ secrets.GLOBAL_NUGET_PUBLISH }}
70- env :
71- NUGET_PUBLISH : ${{ secrets.NUGET_PUBLISH }}
70+ # https://learn.microsoft.com/fr-fr/nuget/nuget-org/trusted-publishing
71+ - name : NuGet login (OIDC → temp API key)
72+ uses : NuGet/login@8d196754b4036150537f80ac539e15c2f1028841 # v1.2.0
73+ id : login
74+ with :
75+ user : ${{ secrets.NUGET_USER }}
76+
77+ # Push the package
78+ - name : NuGet push
79+ run : dotnet nuget push "artifacts/**/*.nupkg" --skip-duplicate --source https://api.nuget.org/v3/index.json --api-key ${{steps.login.outputs.NUGET_API_KEY}}
7280
You can’t perform that action at this time.
0 commit comments