Some checks failed
- Moved 6 workflow plans from .windsurf/workflows/ to .windsurf/plans/ - Maintains git history with git mv - Organizes plans in dedicated plans directory
4.4 KiB
4.4 KiB
description
| description |
|---|
| Package Publishing Workflow for aitbc-sdk and aitbc-crypto |
Package Publishing Workflow
This workflow covers the packaging and publishing of AITBC SDKs to PyPI and npm.
Prerequisites
- Active PyPI account with publishing permissions
- Active npm account with publishing permissions
- GitHub Actions configured for the repository
- Version management strategy defined
Steps
1. PyPI Package Setup for aitbc-sdk
-
Verify package structure
- Ensure
packages/py/aitbc-sdk/has proper package structure - Check
pyproject.tomlconfiguration - Verify package metadata (name, version, description, authors)
- Ensure
-
Configure PyPI publishing
- Add PyPI API token to GitHub repository secrets (
PYPI_API_TOKEN) - Create GitHub Actions workflow for PyPI publishing
- Configure automatic publishing on version tags
- Add PyPI API token to GitHub repository secrets (
-
Test package installation
- Build package locally:
cd packages/py/aitbc-sdk && python -m build - Test installation from built wheel
- Verify imports work correctly
- Build package locally:
-
Publish to PyPI
- Create and push version tag (e.g.,
v0.1.0) - GitHub Actions will automatically publish to PyPI
- Verify package appears on PyPI
- Test installation from PyPI:
pip install aitbc-sdk
- Create and push version tag (e.g.,
2. PyPI Package Setup for aitbc-crypto
-
Verify package structure
- Ensure
packages/py/aitbc-crypto/has proper package structure - Check
pyproject.tomlconfiguration - Verify package metadata
- Ensure
-
Configure PyPI publishing
- Use existing PyPI token from aitbc-sdk
- Create GitHub Actions workflow for aitbc-crypto publishing
- Configure automatic publishing on version tags
-
Test package installation
- Build package locally:
cd packages/py/aitbc-crypto && python -m build - Test installation from built wheel
- Verify cryptographic operations work correctly
- Build package locally:
-
Publish to PyPI
- Create and push version tag
- GitHub Actions will automatically publish
- Verify package appears on PyPI
- Test installation from PyPI:
pip install aitbc-crypto
3. npm Package Setup for JavaScript/TypeScript SDK
-
Verify package structure
- Ensure
packages/js/aitbc-sdk/has proper package structure - Check
package.jsonconfiguration - Verify package metadata (name, version, description, author)
- Ensure
-
Configure npm publishing
- Add npm authentication token to GitHub repository secrets (
NPM_TOKEN) - Create GitHub Actions workflow for npm publishing
- Configure
.npmrcfor proper authentication
- Add npm authentication token to GitHub repository secrets (
-
Test package build
- Build package locally:
cd packages/js/aitbc-sdk && npm run build - Test TypeScript compilation
- Verify type definitions (.d.ts files) are generated
- Build package locally:
-
Publish to npm
- Create and push version tag
- GitHub Actions will automatically publish to npm
- Verify package appears on npm registry
- Test installation from npm:
npm install aitbc-sdk
4. Version Management
-
Define semantic versioning strategy
- Follow SemVer (MAJOR.MINOR.PATCH)
- MAJOR: Breaking changes
- MINOR: New features, backward compatible
- PATCH: Bug fixes, backward compatible
-
Configure version management
- Set up automated version bumping in GitHub Actions
- Create version tags for releases
- Maintain CHANGELOG.md with release notes
-
Version synchronization
- Ensure aitbc-sdk and aitbc-crypto versions are synchronized
- Coordinate Python and JavaScript SDK releases
- Document version compatibility matrix
Verification
- aitbc-sdk published to PyPI and installable
- aitbc-crypto published to PyPI and installable
- aitbc-sdk published to npm and installable
- GitHub Actions workflows successfully publish on tags
- Version management strategy documented
- CHANGELOG.md maintained with release notes
Troubleshooting
- PyPI publishing fails: Check PyPI token permissions, verify package name availability
- npm publishing fails: Verify npm token, check package name availability, ensure
.npmrcis configured - Build fails locally: Check dependencies, verify Python/Node.js versions
- Installation test fails: Verify package structure, check imports/exports
Related Files
packages/py/aitbc-sdk/pyproject.tomlpackages/py/aitbc-crypto/pyproject.tomlpackages/js/aitbc-sdk/package.json.github/workflows/publish-python.yml.github/workflows/publish-js.yml