ci(release): add NuGet release workflow with MinVer versioning - #171
Merged
Merged
Conversation
Add a v* tag-triggered release.yml that packs QueryKit.csproj and publishes to nuget.org through NuGet Trusted Publishing (OIDC). Replace the hardcoded <Version> with MinVer so a tag sets the package version.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
.github/workflows/release.yml. It runs on av*tag push and onworkflow_dispatch, packs onlyQueryKit/QueryKit.csproj, and pushes to nuget.org through NuGet Trusted Publishing (OIDC viaNuGet/login@v1, no long-lived API key).<Version>1.14.2</Version>inQueryKit/QueryKit.csprojwith MinVer (tag prefixv), so av*tag sets the package version.Proof
dotnet packat thev1.14.2tag, with this MinVer change applied, producesQueryKit.1.14.2.nupkg.dotnet packon this branch (52 commits pastv1.14.2) producesQueryKit.1.14.3-alpha.0.53.nupkg, a prerelease above 1.14.2..nuspecpacked at thev1.14.2tag with MinVer is byte-for-byte identical to the.nuspecpacked from the original, unmodified csproj at that same tag. No other package metadata changed.dotnet build --configuration Releasefor the full solution still succeeds.One-time setup needed before the first release
pdevito3, repoQueryKit, workflow filerelease.yml.NUGET_USERActions secret, set to the nuget.org profile name (not email).How to cut a release
mainthat already passed CI.git tag -a v1.14.3 -m "v1.14.3" <commit>.git push origin v1.14.3.The tag push triggers the workflow, which packs and publishes
QueryKit.1.14.3.nupkg.workflow_dispatchis available for a manual re-run;--skip-duplicatemakes a re-push a no-op.Out of scope
This PR does not tag a release, publish a package, run the workflow, create secrets, or change the test workflows or the README.
Test plan
NUGET_USERsecret, per the setup steps above.