Skip to content

Fix NuGet publish and add GitHub Release workflow - #2

Merged
joneja09 merged 2 commits into
mainfrom
cursor/fix-nuget-release-2dda
Aug 26, 2026
Merged

Fix NuGet publish and add GitHub Release workflow#2
joneja09 merged 2 commits into
mainfrom
cursor/fix-nuget-release-2dda

Conversation

@joneja09

@joneja09 joneja09 commented Aug 26, 2026

Copy link
Copy Markdown
Owner

The merge to main failed Windows CI because the leftover IdentityServer4 job still ran ./build.ps1 sign (dotnetfoundation SignClient) and dotnet nuget push to myget.org/F/identity with an empty MYGET secret.

Yes, the NuGet push needed to be fixed. It now uses Trusted Publishing (GitHub OIDC) instead of MyGet or a long-lived API key.

Changes

  • CI on every OS just builds and tests (./build.sh / ./build.ps1). No signing, no MyGet.
  • Release workflow on *.*.* tags (and workflow_dispatch): pack, GitHub Release, nuget.org via NuGet/login@v1 when NUGET_USER is set.
  • id-token: write so the job can request a GitHub OIDC token.
  • fetch-depth: 0 so MinVer can see tags.
  • Package project URL updated to the renamed GitHub repo.
  • Windows build.ps1 now stops if a sub-project build fails.

nuget.org Trusted Publishing (one-time, in your nuget.org account)

  1. nuget.org → Trusted Publishing → add a policy:
    • Repository Owner: joneja09
    • Repository: ForgePoint.Identity
    • Workflow File: release.yml
    • Environment: empty
  2. GitHub repo Settings → Secrets and variables → Actions → Variables: NUGET_USER = your nuget.org profile name (not email).
  3. Merge this PR, then Actions → Release → Run workflow with tag 10.0.0 to push the already-cut GitHub Release packages to nuget.org.

Release

ForgePoint.Identity 10.0.0 is on GitHub with the five nupkgs attached.

Test plan

  • Local ./build.sh on tag 10.0.0; nupkgs are 10.0.0
  • GitHub Release 10.0.0 with five ForgePoint.Identity nupkgs
  • CI green on the previous revision of this PR
  • CI green after Trusted Publishing workflow change
  • nuget.org publish after NUGET_USER + Trusted Publishing policy
Open in Web Open in Cursor 

Main CI no longer authenticode-signs with the IdentityServer SignClient or
pushes to myget.org/F/identity. Tag 10.0.0 (or later) to pack, create a
GitHub Release with nupkgs, and publish to nuget.org when NUGET_API_KEY is set.

Co-authored-by: Jeff Jones <joneja09@users.noreply.github.com>
@joneja09
joneja09 marked this pull request as ready for review August 26, 2026 17:23
The Release workflow exchanges a GitHub OIDC token for a short-lived nuget.org
key via NuGet/login. Set the NUGET_USER repo variable and a matching Trusted
Publishing policy; GitHub Releases still work without it.

Co-authored-by: Jeff Jones <joneja09@users.noreply.github.com>
@joneja09
joneja09 merged commit 819372b into main Aug 26, 2026
3 checks passed
@joneja09
joneja09 deleted the cursor/fix-nuget-release-2dda branch August 26, 2026 17:36
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.

2 participants