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
16 changes: 12 additions & 4 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ env:
jobs:
build:
runs-on: ubuntu-latest
environment: Production
permissions:
contents: write
id-token: write
steps:
- uses: actions/checkout@v7
- name: Check github.ref starts with 'refs/tags/'
Expand All @@ -32,9 +36,6 @@ jobs:
with:
dotnet-version: |
8.0.x
source-url: https://api.nuget.org/v3/index.json
env:
NUGET_AUTH_TOKEN: ${{secrets.NUGET_AUTH_TOKEN}}
- name: Install dependencies
run: dotnet restore
- name: Build solution [Release]
Expand All @@ -47,8 +48,15 @@ jobs:
name: Nuget packages
path: |
out/*
- name: Log in to NuGet.org
uses: NuGet/login@v1
id: nuget-login
with:
user: ${{ vars.NUGET_USER }}
- name: Publish Nuget packages to Nuget registry
run: dotnet nuget push "out/*" -k ${{secrets.NUGET_AUTH_TOKEN}}
env:
NUGET_API_KEY: ${{ steps.nuget-login.outputs.NUGET_API_KEY }}
run: dotnet nuget push "out/*" --source https://api.nuget.org/v3/index.json --api-key "$NUGET_API_KEY"
- name: Upload Nuget packages as release artifacts
uses: actions/github-script@v9
with:
Expand Down
Loading