This document outlines the steps for maintainers to publish IceType packages to npm.
- Ensure you have npm publishing rights for the
@icetypescope - Ensure you are logged in to npm:
npm login - Ensure all tests pass:
npm test --workspaces - Ensure all packages build:
npm run build --workspaces
The packages must be published in order due to workspace dependencies:
@icetype/core(no dependencies)@icetype/iceberg(depends on core)@icetype/cli(depends on core, iceberg)@icetype/adapters(depends on core, iceberg)icetype(depends on core, iceberg, cli)
- Update version numbers in all package.json files
- Update CHANGELOG.md with release notes
- Run tests:
npm test --workspaces - Run build:
npm run build --workspaces - Verify packages:
npm pack --dry-runin each package directory - Commit version bump and changelog updates
- Create git tag for the release
Update the version in each package.json. All packages should have the same version number.
# Example: Update to 0.1.0
npm version 0.1.0 --workspaces --no-git-tag-versionBefore publishing, workspace references need to be replaced with actual version numbers. This is handled automatically by pnpm publish or npm publish with proper configuration.
Publish packages in dependency order:
# Core (no dependencies)
cd packages/core
npm publish --access public
# Iceberg (depends on core)
cd ../iceberg
npm publish --access public
# CLI (depends on core, iceberg)
cd ../cli
npm publish --access public
# Adapters (depends on core, iceberg)
cd ../adapters
npm publish --access public
# Main icetype package (depends on all)
cd ../icetype
npm publish --access publicgit tag v0.1.0
git push origin v0.1.0If you see errors about workspace:* protocol, you need to replace these with actual version numbers before publishing, or use a tool like pnpm publish which handles this automatically.
For first-time publishing of scoped packages, use --access public:
npm publish --access publicFor pre-release versions (alpha, beta, rc):
npm publish --tag next --access publicFor automated publishing via GitHub Actions:
- Set
NPM_TOKENas a repository secret - Use the following workflow step:
- name: Publish to npm
run: |
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc
npm publish --access public --workspaces
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}This project follows Semantic Versioning:
- MAJOR: Breaking API changes
- MINOR: New features (backward compatible)
- PATCH: Bug fixes (backward compatible)
Pre-release versions follow the format: X.Y.Z-rc.N