File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed
Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change 1010 - v*
1111 pull_request :
1212
13+ permissions :
14+ contents : read
15+ id-token : write # required for GitHub OIDC
16+
1317env :
1418 postgis_version : 3
1519 DOTNET_SKIP_FIRST_TIME_EXPERIENCE : true
@@ -160,6 +164,8 @@ jobs:
160164 needs : build
161165 runs-on : ubuntu-24.04
162166 if : github.event_name == 'push' && startsWith(github.repository, 'npgsql/') && needs.build.outputs.is_release == 'true'
167+ permissions :
168+ id-token : write # enable GitHub OIDC token issuance for this job
163169 environment : nuget.org
164170
165171 steps :
@@ -180,6 +186,13 @@ jobs:
180186
181187 # TODO: Create a release
182188
189+ # Get a short-lived NuGet API key
190+ - name : NuGet login (OIDC)
191+ uses : NuGet/login@v1
192+ id : login
193+ with :
194+ user : ${{ secrets.NUGET_USER }}
195+
183196 - name : Publish to nuget.org
184- run : dotnet nuget push "*.nupkg" --api-key ${{ secrets.NUGET_ORG_API_KEY }} --source https://api.nuget.org/v3/index.json
197+ run : dotnet nuget push "*.nupkg" --api-key ${{ steps.login.outputs.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json
185198 working-directory : nupkgs
You can’t perform that action at this time.
0 commit comments