This document explains the release workflows and processes for CodeCharta.
CodeCharta uses several GitHub Actions workflows to manage releases for both the Visualization and Analysis components. These workflows handle:
- Preparing releases
- Publishing releases
- Staging deployments
- Unpublishing releases (if needed)
Before releasing:
- Ensure all changes are merged to main
- Verify tests pass
- Check changelog entries are complete
- Ensure you have required permissions
The prepare release workflow (prepare-release.yml
) is triggered manually and handles:
- Updating version numbers
- Creating changelog entries
- Creating release posts
- Opening a pull request for the release
Usage:
- Go to Actions → "Prepare Release - Visualization/Analysis" → "Run workflow"
- Select:
- Repository (Visualization or Analysis)
- Version type (Follow Semantic Versioning)
- Patch: Bug fixes, backward compatible
- Minor: New features, backward compatible
- Major: Breaking changes
- Run workflow
The workflow will:
- Use the version manager to update versions
- Add appropriate labels
- Update documentation
- Create a release PR
Triggered when:
- The release PR from previous step is merged
The workflow will:
- Build artifacts
- Create GitHub release
- Publish to npm
- Publish to Docker Hub
- Deploy to GitHub Pages
Similar to visualization but the workflow will:
- Build artifacts
- Create GitHub release
- Publish node wrapper to npm
- Publish to Docker Hub
After a release:
- Verify all artifacts are published
- Check documentation is updated
- Verify staging deployments
- Monitor for any issues
Triggered on:
- Push to main (visualization files)
- Manual trigger
Deploys:
- Staging npm package
- Staging Docker image
- Staging GitHub Pages
Similar to visualization staging but for analysis components.
The unpublish workflow (unpublish-release.yml
) provides options to:
- Unpublish from npm
- Remove Docker images
- Delete GitHub release
- Create revert PR
Usage:
- Go to Actions → "Unpublish Release"
- Select:
- Repository
- Version
- Unpublish type (all, npm, docker, github)
- Whether to create revert PR
The version manager script (version-manager.ts
) handles:
- Version updates
- Changelog management
- Release post creation
- Documentation updates
updateVersion
: Updates version numbers across all relevant filesextractChangelog
: Extracts changelog entries for releasesupdateReadme
: Updates version numbers in README.md
If a release fails:
- Check workflow logs
- Use unpublish workflow if needed
- Create revert PR if necessary (using the unpublish workflow)
- Always use the prepare release workflow instead of manual version updates
- Keep changelogs up to date
- Test staging deployments before releasing
- Monitor release workflows for completion