Go to: https://github.com/4mritgiri/npdatetime/settings/secrets/actions
Add these 3 secrets:
| Secret Name | Where to Get It | Purpose |
|---|---|---|
CARGO_TOKEN |
https://crates.io/me → New Token | Publish to crates.io |
NPM_TOKEN |
https://npmjs.com/settings/4mritgiri/tokens | Publish to npm |
PYPI_TOKEN |
https://pypi.org/manage/account/token/ | Publish to PyPI |
# Use the version update script
python3 update_version.py 0.1.1
# This updates version in ALL packages automatically:
# - Cargo.toml
# - bindings/python/Cargo.toml & pyproject.toml
# - bindings/javascript/package.json
# - bindings/django/setup.py, pyproject.toml, __init__.py# Update main CHANGELOG.md
vim CHANGELOG.md
# Update Django CHANGELOG.md
vim bindings/django/CHANGELOG.mdcd bindings/django
python3 build_assets.py
cd ../..# Test Rust
cargo test --all-features
# Test Python
cd bindings/python && maturin develop && pytest
# Test Django
cd bindings/django && pip install -e . && python -c "import npdt"# Commit changes
git add .
git commit -m "chore: release version 0.1.1"
# Create tag
git tag v0.1.1
# Push everything
git push origin main
git push origin v0.1.1GitHub Actions will automatically:
- ✅ Build and test everything
- ✅ Publish to crates.io
- ✅ Publish to npm
- ✅ Publish to PyPI (Python package)
- ✅ Publish to PyPI (Django package)
- ✅ Create GitHub Release
Monitor at: https://github.com/4mritgiri/npdatetime/actions
# Update version across all packages
python3 update_version.py 0.1.1
# Build Django assets
cd bindings/django && python3 build_assets.py
# Test everything locally
cargo test --all-features
# Create and push release
git add . && git commit -m "chore: release v0.1.1"
git tag v0.1.1
git push && git push --tags
# Check published packages
open https://crates.io/crates/npdatetime
open https://pypi.org/project/npdatetime
open https://pypi.org/project/django-npdt
open https://npmjs.com/package/@4mritgiri/npdatetimeQ: Workflow failed with authentication error → Check that you've added all three secrets correctly
Q: Package already published error → This is normal if version hasn't changed. Workflow continues anyway.
Q: Django package fails to build
→ Make sure you ran cd bindings/django && python3 build_assets.py
Q: Want to test without publishing? → Create a branch and push there. Only tags trigger publishing.
graph TB
A[Push tag v0.1.1] --> B[GitHub Actions Triggered]
B --> C[Build Rust Crate]
B --> D[Build WASM/JS]
B --> E[Build Python Wheels]
B --> F[Build Django Package]
C --> G[Publish to crates.io]
D --> H[Publish to npm]
E --> I[Publish to PyPI]
F --> J[Publish Django to PyPI]
G --> K[Create GitHub Release]
H --> K
I --> K
J --> K
- CI/CD Setup Guide - Complete setup instructions
- Publish Workflow - Publishing automation
- CI Workflow - Testing automation
- Bindings Tests - Python/Django tests
That's it! Simple 6-step process to release everything at once! 🎉