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)
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"
- Select:
- Repository (Visualization or Analysis)
- Version type (patch, minor, major)
- Run workflow
The workflow will:
- Use the version manager to update versions
- Create a release PR
- Add appropriate labels
- Update documentation
Triggered when:
- A release PR is merged
- Manual trigger with version input
Steps:
- Builds artifacts
- Creates GitHub release
- Publishes to npm
- Publishes to Docker Hub
- Deploys to GitHub Pages
Similar to visualization but with analysis-specific steps:
- Builds artifacts
- Creates GitHub release
- Publishes node wrapper to npm
- Publishes to Docker Hub
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
Before releasing:
- Ensure all changes are merged to main
- Verify tests pass
- Check changelog entries are complete
- Ensure you have required permissions
Follow Semantic Versioning:
- Major: Breaking changes
- Minor: New features, backward compatible
- Patch: Bug fixes, backward compatible
After a release:
- Verify all artifacts are published
- Check documentation is updated
- Verify staging deployments
- Monitor for any issues
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