Release Workflow#
The release process is automated through the tidy3d-python-client-release GitHub Actions workflow.
Triggering a Release#
Releases are triggered manually via GitHub Actions:
Go to Actions ? public/tidy3d/python-client-release
Click Run workflow
Configure the release parameters
Release Parameters#
Required:
release_tag: Version tag (e.g.,v2.10.0,v2.10.0rc1)
Optional:
release_type:draft(default): Test release, no PyPI publishfinal: Official release, publishes to PyPI
workflow_control: Stage control for resuming partial releasesstart-tag: Full release from tag creationstart-tests: Resume from testsstart-deploy: Resume from deploymentonly-tag: Create tag onlyonly-tests: Run tests onlyonly-tag-tests: Tag + tests onlyonly-tag-deploy: Tag + deploy only
client_tests,cli_tests,submodule_tests: Enable/disable specific test suites (default: alltrue)
Release Workflow Stages#
1. Tag Creation
Creates and pushes a git tag for the release version.
2. Tests
Runs comprehensive test suite including:
Local tests: Fast tests on self-hosted runners (Python 3.10, 3.13)
Remote tests: Full matrix tests on GitHub runners (Python 3.10-3.13, Windows/Linux/macOS)
CLI tests: Develop CLI functionality tests
Submodule tests: Integration tests with dependent packages
Code quality: Linting, type checking, commit message validation, security analysis
Note
Submodule tests are automatically enabled for final non-RC releases (versions that push to latest).
3. Deployment (if tests pass)
Creates GitHub release (draft or final)
Publishes to PyPI (final releases only)
Syncs documentation to ReadTheDocs
Syncs branches (final releases only)
Test Validation#
All tests are validated through a centralized workflow-validation job in the tests workflow. The release gatekeeper checks this validation before allowing deployment.
If any required test fails, deployment is automatically blocked.
Release Types#
Draft Release (release_type: draft)
For testing and verification
Creates GitHub release as draft
Does not publish to PyPI
Does not sync branches
Tag format not strictly enforced
Final Release (release_type: final)
For production deployment
Creates public GitHub release
Publishes to PyPI
Syncs branches to maintain consistency
Tag format strictly enforced:
v{major}.{minor}.{patch}[rc{num}]
Non-RC Final Release (e.g., v2.10.0)
Pushes to
latestbranchAutomatically runs submodule tests
Represents stable production release
RC Release (e.g., v2.10.0rc1)
Pre-release candidate
Does not push to
latestSubmodule tests run only if explicitly enabled
Examples#
Standard Release:
release_tag: v2.10.0
release_type: final
workflow_control: start-tag
# All tests enabled by default
# Submodule tests auto-enabled (non-RC)
RC Release:
release_tag: v2.10.0rc1
release_type: final
workflow_control: start-tag
# Submodule tests not auto-enabled (RC)
Test-Only Run:
release_tag: v2.10.0
release_type: draft
workflow_control: only-tests
client_tests: true
Resume Failed Release (from deployment):
release_tag: v2.10.0
release_type: final
workflow_control: start-deploy
# Skips tag creation and tests
Release Changelog Build#
Before running the release workflow, generate release notes from changelog.d fragments:
RELVER=$(uv version --short | sed -E 's/\.dev[0-9]+$//')
RELDATE=$(date -u +%F)
uv run towncrier build --yes --version "${RELVER}" --date "${RELDATE}"
uv run python scripts/changelog_refs.py --version "${RELVER}"
This sequence:
Derives the release version from
pyproject.toml(for example2.11.0.dev0->2.11.0).Builds
CHANGELOG.mdand consumes fragment files.Adds or updates the reference-style compare link for
[RELVER]using the latest reachable stablevX.Y.Ztag as the previous version.
Commit the updated CHANGELOG.md and removed fragment files in the same release commit.
Automated Changelog PR Workflow#
You can automate changelog generation and PR creation with GitHub Actions workflow public/tidy3d/python-client-build-changelog-pr.
Default source branch:
developDefault target branch:
developOptional overrides:
source_branch,target_branch,release_version,release_date,previous_version
This workflow runs Towncrier, updates compare reference links, and opens a PR with the resulting changes.
Best Practices#
Always test first: Run a
draftrelease beforefinalUse RC versions: Test with
v2.10.0rc1before releasingv2.10.0Monitor test results: Check the
workflow-validationjob for detailed test statusResume on failure: Use
workflow_controlstages to resume from failure pointsVerify submodules: For final releases, ensure submodule tests pass (auto-enabled for non-RC)