原始内容
pi-packages
A monorepo for multiple pi packages.
Structure
packages/
tavily-tools/
Workspace commands
cd ~/projects/my/pi-packages
npm install
npm run pack:tavily-tools
npm run publish:tavily-tools
Generic monorepo helpers:
npm run test:tavily-tools
npm run pack:workspace -- --name=pi-tavily-tools
npm run publish:workspace -- --name=pi-tavily-tools
npm run tag:workspace -- --name=pi-tavily-tools
Publish flow
Publish a workspace package directly
cd ~/projects/my/pi-packages/packages/tavily-tools
npm publish --access public
Publish with GitHub Actions
Use package-level tags in this monorepo:
<package-name>-v<version>
Example:
git tag pi-tavily-tools-v0.1.0
git push origin pi-tavily-tools-v0.1.0
The release workflow will:
- only run for package release tags
- require the tag commit to be on
main - resolve the workspace package from the tag
- verify the tag version matches that package's
package.json - fail early if that package version already exists on npm
- publish only that package to npm
- create a GitHub Release with generated notes
- attach the packed
npm packtarball to the GitHub Release
Install locally with pi
pi install ~/projects/my/pi-packages/packages/tavily-tools