Skip to content

Commit e0d4c77

Browse files
committed
ci: fix trusted publishing login user
1 parent 4fe8885 commit e0d4c77

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

.github/workflows/nuget-publish.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,15 +43,16 @@ jobs:
4343
run: dotnet pack SWEN3.Paperless.RabbitMq/SWEN3.Paperless.RabbitMq.csproj --configuration Release --no-build --output ./nupkg -p:GeneratePackageOnBuild=false
4444

4545
- name: NuGet login (OIDC → temp API key)
46-
uses: NuGet/login@v1
4746
id: login
47+
if: github.event_name == 'release' || github.event_name == 'workflow_dispatch'
48+
uses: NuGet/login@v1
49+
with:
50+
user: ${{ secrets.NUGET_USER }}
4851

4952
- name: Publish packages to NuGet.org (Trusted Publishing)
5053
if: github.event_name == 'release' || github.event_name == 'workflow_dispatch'
51-
env:
52-
NUGET_AUTH_TOKEN: ${{ steps.login.outputs.NUGET_AUTH_TOKEN }}
5354
run: |
5455
dotnet nuget push ./nupkg/*.nupkg \
5556
--source https://api.nuget.org/v3/index.json \
56-
--api-key "$NUGET_AUTH_TOKEN" \
57+
--api-key "${{ steps.login.outputs.NUGET_API_KEY }}" \
5758
--skip-duplicate

0 commit comments

Comments
 (0)