Fix CLI publish workflow for nested package#94
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #94 +/- ##
=======================================
Coverage 80.64% 80.64%
=======================================
Files 43 43
Lines 5801 5801
=======================================
Hits 4678 4678
Misses 1123 1123
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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
Fix the
mcp_dart_clipublish workflow so nested package releases are published from a clean temporary copy of the repository instead of directly frompackages/mcp_dart_cliinside the Git checkout.The failed
mcp_dart_cli-v0.1.7release produced an effectively empty archive (<1 KB) and pub.dev validation then reported missingpubspec.yaml,LICENSE,README.md,CHANGELOG.md, andbin/mcp_dart.dart. The files were present;dart pub publishwas packaging the nested package incorrectly from the Git worktree.This workflow now preserves normal top-level
mcp_dartpublishing, while CLI tags copy the repo to$RUNNER_TEMP, remove Git/build/cache metadata, and publish from the copiedpackages/mcp_dart_clidirectory. Keeping the full repo layout preserves the CLI package's existingmcp_dartpath override during release validation.Validation
.github/workflows/publish.ymlas YAML locally./private/tmp.dart pub publish --dry-runfrom the copiedpackages/mcp_dart_clidirectory.24 KBarchive containing the expected package files and reports0 warningswith only the existing dependency override hint.