ci: add NuGet pack & publish workflow#6
Merged
Merged
Conversation
Add .github/workflows/release.yml to pack and publish the `dcli` and `dcli.testing` packages. - Triggers on `v*` version tags (version derived from the tag) or manual dispatch (optional version override + dry-run pack-only mode). - Gates publish on a Release build + full test run. - Packs both library projects, uploads the .nupkg/.snupkg as a workflow artifact, and pushes to nuget.org with --skip-duplicate. - Version override propagates to dcli.testing's dependency on dcli, so both packages always ship in lockstep. Requires a NUGET_API_KEY secret (repo- or `nuget`-environment-scoped). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The NUGET_API_KEY secret is configured at the daemonicai org level and is available to this repo's workflows directly, so the per-job `environment: nuget` reference is unnecessary. Remove it. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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
Adds
.github/workflows/release.ymlto pack and publish thedclianddcli.testingNuGet packages. The packaging metadata already lives in the two csprojs (SourceLink, symbols, READMEs,IsPackable); this wires up the release automation.How it works
Triggers
git tag v0.2.0-rc.3 && git push origin v0.2.0-rc.3. The version is taken from the tag (leadingvstripped).Pipeline
dotnet packboth library projects with the resolved version..nupkg+.snupkgas a workflow artifact.dotnet nuget pushto nuget.org with--skip-duplicate(symbol packages uploaded automatically).The version override flows through the
dcli.testing→dcliProjectReference, so both packages always publish in lockstep at the same version.Auth
Uses the organization-level
NUGET_API_KEYsecret in the daemonicai org settings — available to this repo's workflows directly, so no per-repo secret or environment is needed. Just ensure this repo is in the org secret's access list.Verification (local)
dcli.*.nupkg/.snupkganddcli.testing.*.nupkg/.snupkgproduced.dcli.testing's nuspec depends ondcliat the overridden version, and both READMEs are embedded.🤖 Generated with Claude Code