Skip to content
Open
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
11 changes: 10 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@ jobs:
permissions:
actions: read
packages: write
id-token: write

steps:
- name: Download artifacts
Expand All @@ -205,10 +206,18 @@ jobs:
--source https://nuget.pkg.github.com/passwordless-lib/index.json
--api-key ${{ secrets.GITHUB_TOKEN }}

# Only login to NuGet on stable release
- name: NuGet login (NuGet Registry)
uses: NuGet/login@v1
if: ${{ github.event_name == 'release' || github.event.inputs.force_release }}
id: nuget-login
with:
user: ${{ secrets.NUGET_USER }}

# Only publish to NuGet on stable releases
- name: Publish packages (NuGet Registry)
if: ${{ github.event_name == 'release' || github.event.inputs.force_release }}
run: >
dotnet nuget push **/*.nupkg
--source https://api.nuget.org/v3/index.json
--api-key ${{ secrets.nuget_api_key }}
--api-key ${{ steps.nuget-login.outputs.NUGET_API_KEY }}