Skip to content

ci: use OIDC for NuGet package push authentication#60

Merged
guitarrapc merged 11 commits into
mainfrom
ci/nuget
May 20, 2026
Merged

ci: use OIDC for NuGet package push authentication#60
guitarrapc merged 11 commits into
mainfrom
ci/nuget

Conversation

@guitarrapc
Copy link
Copy Markdown
Contributor

This updates the build-release workflow to leverage OpenID Connect (OIDC) for authenticating with NuGet.org. The package push operation is now performed directly within the build job, replacing static API key usage with ephemeral credentials for enhanced security.

This updates the build-release workflow to leverage OpenID Connect (OIDC) for authenticating with NuGet.org. The package push operation is now performed directly within the build job, replacing static API key usage with ephemeral credentials for enhanced security.
@guitarrapc guitarrapc requested a review from mayuki as a code owner May 20, 2026 06:55
Copilot AI review requested due to automatic review settings May 20, 2026 06:55
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates the release GitHub Actions workflow to publish NuGet packages using NuGet.org Trusted Publishing (OIDC) instead of a static API key, moving the push step into the build job and disabling NuGet push in the reusable create-release workflow call.

Changes:

  • Add NuGet/login (OIDC) step and perform dotnet nuget push from the build job.
  • Disable nuget-push in the create-release reusable workflow invocation.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/build-release.yaml Outdated
Comment thread .github/workflows/build-release.yaml Outdated
Comment thread .github/workflows/build-release.yaml
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 2 comments.

Comment thread .github/workflows/build-release.yaml Outdated
Comment thread .github/workflows/build-release.yaml Outdated
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

Comments suppressed due to low confidence (1)

.github/workflows/build-release.yaml:43

  • The build steps set VersionSuffix=${{ inputs.tag }} but the pack steps set VersionPrefix=${{ inputs.tag }} while using --no-build. Since Directory.Build.props defines VersionPrefix as 1.0.0, the assemblies produced by dotnet build will have version 1.0.0-${tag}, but the resulting NuGet package version will be ${tag}. Align the version properties used for build and pack (e.g., set the same Version/VersionPrefix/VersionSuffix on both) to avoid publishing packages whose assembly informational version does not match the package version.
      - run: dotnet build ./src/GrpcWebSocketBridge.AspNetCore/ -c Release -p:VersionSuffix=${{ inputs.tag }}
      - run: dotnet build ./src/GrpcWebSocketBridge.Client/ -c Release -p:VersionSuffix=${{ inputs.tag }}
      - run: dotnet pack -c Release --no-build --include-source -p:IncludeSymbols=true -p:SymbolPackageFormat=snupkg -p:VersionPrefix=${{ inputs.tag }} -o ./publish/ ./src/GrpcWebSocketBridge.AspNetCore
      - run: dotnet pack -c Release --no-build --include-source -p:IncludeSymbols=true -p:SymbolPackageFormat=snupkg -p:VersionPrefix=${{ inputs.tag }} -o ./publish/ ./src/GrpcWebSocketBridge.Client

Comment thread .github/workflows/build-release.yaml
Comment thread .github/workflows/build-pr.yaml Outdated
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

Comment thread .github/workflows/build-release.yaml
Comment thread .github/workflows/build-release.yaml Outdated
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

Comment thread .github/workflows/build-release.yaml Outdated
Comment thread .github/workflows/build-release.yaml Outdated
Comment thread .github/workflows/build-pr.yaml Outdated
guitarrapc and others added 2 commits May 20, 2026 19:06
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@guitarrapc guitarrapc merged commit 2ac00dc into main May 20, 2026
1 check passed
@guitarrapc guitarrapc deleted the ci/nuget branch May 20, 2026 12:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants