Skip to content

Publish releases to NuGet with Trusted Publishing - #45

Merged
sinanbozkus merged 2 commits into
masterfrom
release-workflow
Sep 24, 2026
Merged

sinanbozkus merged 2 commits into
masterfrom
release-workflow

Conversation

@sinanbozkus

Copy link
Copy Markdown
Owner

When a GitHub release is published, release.yml does the following. It never runs on a push.

  • Checks that the release tag matches <Version> in src/Directory.Build.props, and stops otherwise.
  • Packs FormHelper and FormHelper.FluentValidation.
  • Pushes them to nuget.org with a short-lived key from Trusted Publishing, so no API key is stored. FormHelper goes first, then FormHelper.FluentValidation. Symbols are pushed too.
  • Attaches the scripts/styles zip and the packages to the release.

It replaces release-assets.yml. The Trusted Publishing policy on nuget.org points at this workflow file.

A published GitHub release packs FormHelper and FormHelper.FluentValidation,
pushes them to nuget.org with a short-lived key from Trusted Publishing (no
stored API key) and attaches the scripts, styles and packages to the release.
Stops when the release tag doesn't match the version in Directory.Build.props.
Replaces release-assets.yml.
It issues the NuGet key; a tag could be moved.
@sonarqubecloud

Copy link
Copy Markdown

@sinanbozkus
sinanbozkus merged commit 69a3710 into master Sep 24, 2026
7 checks passed
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.

1 participant