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
@@ -177,6 +178,8 @@ jobs:
177178 needs : build
178179 runs-on : ubuntu-22.04
179180 if : github.event_name == 'push' && startsWith(github.repository, 'npgsql/') && needs.build.outputs.is_release == 'true'
181+ permissions :
182+ id-token : write # enable GitHub OIDC token issuance for this job
180183 environment : nuget.org
181184
182185 steps :
@@ -197,6 +200,13 @@ jobs:
197200
198201 # TODO: Create a release
199202
203+ # Get a short-lived NuGet API key
204+ - name : NuGet login (OIDC)
205+ uses : NuGet/login@v1
206+ id : login
207+ with :
208+ user : ${{ secrets.NUGET_USER }}
209+
200210 - name : Publish to nuget.org
201- run : dotnet nuget push "*.nupkg" --api-key ${{ secrets.NUGET_ORG_API_KEY }} --source https://api.nuget.org/v3/index.json
211+ run : dotnet nuget push "*.nupkg" --api-key ${{ steps.login.outputs.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json
202212 working-directory : nupkgs
You can’t perform that action at this time.
0 commit comments