Skip to content

fix(ci): use NuGet login action instead of manual login nuget#7903

Merged
erickguan merged 6 commits into
apache:mainfrom
Fatorin:nuget-login-track
Jul 13, 2026
Merged

fix(ci): use NuGet login action instead of manual login nuget#7903
erickguan merged 6 commits into
apache:mainfrom
Fatorin:nuget-login-track

Conversation

@Fatorin

@Fatorin Fatorin commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

Which issue does this PR close?

Closes #7899

Rationale for this change

ASF allow list now supports the NuGet/login action, so we can use the official action instead of the previous manual NuGet authentication flow.

This simplifies the workflow and provides a more maintainable approach for NuGet trusted publishing.

What changes are included in this PR?

  • Replace the manual NuGet authentication flow with NuGet/login action.
  • Simplify the workflow by using the official NuGet authentication action.

Are there any user-facing changes?

None.

AI Usage Statement

Used GPT-5.5-mini to help write the PR description and verify the content.

@Fatorin Fatorin requested review from Xuanwo and tisonkun as code owners July 11, 2026 11:29
@dosubot dosubot Bot added size:XS This PR changes 0-9 lines, ignoring generated files. releases-note/ci The PR modifies CI-related content or has a title that begins with "ci" labels Jul 11, 2026
@Fatorin Fatorin changed the title fix(ci): add logs to debug NuGet login failures fix(ci): use NuGet login action instead of manual login nuget Jul 12, 2026
@Fatorin

Fatorin commented Jul 12, 2026

Copy link
Copy Markdown
Contributor Author

Update: ASF allow list now supports NuGet/login action, so I changed the implementation to use the official action instead of the previous manual authentication flow.

Comment thread .github/workflows/release_dotnet.yml Outdated
| python3 -c 'import json, sys; print(json.load(sys.stdin)["apiKey"])')"
echo "::add-mask::${api_key}"
echo "NUGET_API_KEY=${api_key}" >> "${GITHUB_OUTPUT}"
uses: NuGet/login@8d196754b4036150537f80ac539e15c2f1028841

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I recommend adding a version like other actions.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried using NuGet/login@v1.2.0, but it failed the ASF Allowlist Check.
I pinned it to the commit SHA and added the # v1.2.0 version comment in the latest commit.

@dosubot dosubot Bot added the lgtm This PR has been approved by a maintainer label Jul 12, 2026
@erickguan erickguan merged commit f6939d1 into apache:main Jul 13, 2026
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm This PR has been approved by a maintainer releases-note/ci The PR modifies CI-related content or has a title that begins with "ci" size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

release: Dotnet NuGet trusted publishing returns 401

2 participants