Skip to content

Commit 277b9e1

Browse files
Use NUGET_API_KEY (#4006)
Use the `NUGET_API_KEY` environment variable instead of specifying `--api-key`.
1 parent a1940a0 commit 277b9e1

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

.github/workflows/build.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -248,11 +248,11 @@ jobs:
248248

249249
- name: Push NuGet packages to MyGet.org
250250
env:
251-
API_KEY: ${{ secrets.MYGET_TOKEN }}
251+
NUGET_API_KEY: ${{ secrets.MYGET_TOKEN }}
252252
PACKAGE_VERSION: ${{ needs.build.outputs.package-version }}
253253
SOURCE: "https://www.myget.org/F/domaindrivendev/api/v3/index.json"
254254
run: | # zizmor: ignore[use-trusted-publishing] MyGet does not support trusted publishing
255-
dotnet nuget push "*.nupkg" --api-key "${API_KEY}" --skip-duplicate --source "${SOURCE}" && echo "::notice title=myget.org::Published version ${PACKAGE_VERSION} to MyGet."
255+
dotnet nuget push "*.nupkg" --skip-duplicate --source "${SOURCE}" && echo "::notice title=myget.org::Published version ${PACKAGE_VERSION} to MyGet."
256256
257257
publish-nuget:
258258
needs: [ build, validate-packages ]
@@ -288,11 +288,11 @@ jobs:
288288

289289
- name: Push NuGet packages to NuGet.org
290290
env:
291-
API_KEY: ${{ steps.nuget-login.outputs.NUGET_API_KEY }}
291+
NUGET_API_KEY: ${{ steps.nuget-login.outputs.NUGET_API_KEY }}
292292
PACKAGE_VERSION: ${{ needs.build.outputs.package-version }}
293293
SOURCE: https://api.nuget.org/v3/index.json
294294
run: |
295-
dotnet nuget push "*.nupkg" --api-key "${API_KEY}" --skip-duplicate --source "${SOURCE}" && echo "::notice title=nuget.org::Published version ${PACKAGE_VERSION} to NuGet.org."
295+
dotnet nuget push "*.nupkg" --skip-duplicate --source "${SOURCE}" && echo "::notice title=nuget.org::Published version ${PACKAGE_VERSION} to NuGet.org."
296296
297297
notify-nuget:
298298
needs: [ build, publish-nuget ]

0 commit comments

Comments
 (0)