Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ on:

permissions:
contents: read
id-token: write # required for GitHub OIDC

env:
postgis_version: 3
Expand Down Expand Up @@ -165,6 +166,8 @@ jobs:
needs: build
runs-on: ubuntu-24.04
if: github.event_name == 'push' && startsWith(github.repository, 'npgsql/') && needs.build.outputs.is_release == 'true'
permissions:
id-token: write # enable GitHub OIDC token issuance for this job
environment: nuget.org

steps:
Expand All @@ -185,6 +188,13 @@ jobs:

# TODO: Create a release

# Get a short-lived NuGet API key
- name: NuGet login (OIDC)
uses: NuGet/login@v1
id: login
with:
user: ${{ secrets.NUGET_USER }}

- name: Publish to nuget.org
run: dotnet nuget push "*.nupkg" --api-key ${{ secrets.NUGET_ORG_API_KEY }} --source https://api.nuget.org/v3/index.json
run: dotnet nuget push "*.nupkg" --api-key ${{ steps.login.outputs.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json
working-directory: nupkgs
Loading