File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change 1212
1313permissions :
1414 contents : read
15+ id-token : write # required for GitHub OIDC
1516
1617env :
1718 postgis_version : 3
@@ -165,6 +166,8 @@ jobs:
165166 needs : build
166167 runs-on : ubuntu-24.04
167168 if : github.event_name == 'push' && startsWith(github.repository, 'npgsql/') && needs.build.outputs.is_release == 'true'
169+ permissions :
170+ id-token : write # enable GitHub OIDC token issuance for this job
168171 environment : nuget.org
169172
170173 steps :
@@ -185,6 +188,13 @@ jobs:
185188
186189 # TODO: Create a release
187190
191+ # Get a short-lived NuGet API key
192+ - name : NuGet login (OIDC)
193+ uses : NuGet/login@v1
194+ id : login
195+ with :
196+ user : ${{ secrets.NUGET_USER }}
197+
188198 - name : Publish to nuget.org
189- run : dotnet nuget push "*.nupkg" --api-key ${{ secrets.NUGET_ORG_API_KEY }} --source https://api.nuget.org/v3/index.json
199+ run : dotnet nuget push "*.nupkg" --api-key ${{ steps.login.outputs.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json
190200 working-directory : nupkgs
You can’t perform that action at this time.
0 commit comments