Release Workflow
This project uses Release Please for automated releases and npm Trusted Publishing (OIDC) for secure package publishing.
How It Works
Push to main -> Release Please creates PR -> Merge PR -> GitHub Release -> npm Publish | | | | | +- Conventional +- Changelog +- Tag +- Triggers +- OIDC auth Commits generated created publish.yml (no tokens!)Conventional Commits
Use conventional commit messages to trigger releases:
feat: add new feature -> minor bump (0.1.0 -> 0.2.0)fix: fix a bug -> patch bump (0.1.0 -> 0.1.1)feat!: breaking change -> major bump (0.1.0 -> 1.0.0)docs: update readme -> no releasechore: update deps -> no releaserefactor: restructure code -> no releaseScoping to Packages
Use scopes to target specific packages:
feat(pythonlib): add new itertools functionfix(python2ts): fix parser edge casefeat(pythonlib)!: breaking API changeRelease Process
- Push commits to main with conventional commit messages
- Release Please creates a PR with:
- Version bump in package.json
- Updated CHANGELOG.md
- Release notes
- Review and merge the Release Please PR
- GitHub Release is created automatically
- Publish workflow triggers and publishes to npm
Manual Publishing
For manual publishing (e.g., first publish or testing):
# Build packagespnpm build
# Publish pythonlib first (no dependencies)cd packages/pythonlibnpm publish --access public
# Then publish python2ts (depends on pythonlib)cd ../python2tsnpm publish --access publicWorkflow Dispatch
You can manually trigger the publish workflow from GitHub Actions:
- Go to Actions -> Publish
- Click “Run workflow”
- Select package:
pythonlib,python2ts, orboth - Enable dry-run to test without publishing
Setup Requirements
GitHub Secrets
RELEASE_PLEASE_TOKEN: GitHub PAT withreposcope
npm Trusted Publishing
Configure for each package on npmjs.com:
- Go to package -> Settings -> Publishing access
- Add trusted publisher:
- Repository owner:
sebastian-software - Repository name:
python2ts - Workflow filename:
publish.yml
- Repository owner:
Troubleshooting
Release Please not creating PRs
- Check commit messages follow conventional format
- Verify PAT has
reposcope - Look for stuck PRs with
autorelease: pendinglabel
npm publish 404 error
- Ensure Node.js 24+ (npm v11+ for OIDC)
- Verify
repositoryfield in package.json - Check trusted publisher config matches workflow filename exactly
Publishing order
pythonlib must be published before python2ts because python2ts depends on it. The publish workflow handles this automatically.