Skip to content

Commit 628fe98

Browse files
jaredparCopilot
andauthored
Fix: pass OIDC API key to nuget push command (#92)
The NuGet/login step outputs the API key but the push command wasn't using it. Add step id and reference the output via --api-key. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 21f5f5e commit 628fe98

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

.github/workflows/publish.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,13 @@ jobs:
5656
run: dotnet pack -p:PackageOutputPath="${GITHUB_WORKSPACE}/packages" -p:IncludeSymbols=false -p:RepositoryCommit=${GITHUB_SHA} -p:PackageVersion="${{ steps.version.outputs.version }}" -c Release
5757

5858
- name: NuGet login (OIDC)
59+
id: nuget-login
5960
uses: NuGet/login@v1
6061
with:
6162
user: jaredpar
6263

6364
- name: Publish NuPkg Files
64-
run: dotnet nuget push "$GITHUB_WORKSPACE/packages/*.nupkg" -s https://api.nuget.org/v3/index.json --skip-duplicate
65+
run: dotnet nuget push "$GITHUB_WORKSPACE/packages/*.nupkg" --api-key ${{ steps.nuget-login.outputs.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate
6566

6667
- name: Create Tag and Release
6768
env:

0 commit comments

Comments
 (0)