Skip to content

Releasing

David Foster edited this page Apr 3, 2026 · 9 revisions

To release a new version of Crystal:

  • Update the version number in src/crystal/__init__.py (and other places).
    • test_version.py will verify that all copies of the version number are updated.
  • Ensure all the automated tests pass.
  • Review/revise the release notes.
  • Rebuild the Mac and Windows binary on the earliest supported Mac/Windows versions, as documented in the README.
    • These binaries can be rebuilt in GitHub Actions: Go to the "ci" job, press the "Run workflow" button, enable the "Build distribution artifact for macOS and Windows" checkbox, and press the colored "Run workflow" button.
  • Smoke test: Install/test the built binaries on a fresh Mac/Windows VM, attempting to download/serve a simple web page like https://xkcd.com/ .
  • Update the README to point to where the latest binaries will be.
  • Tag the Git commit as v#.#.# for the version:
    • CRYSTAL_VERSION=$(python3 -c "import crystal; print(crystal.__version__)")
    • git tag v$CRYSTAL_VERSION
    • git push origin --tags
  • Build/push the "Crystal on AWS" container image to public ECR:
    • src/crystal_on_aws/deploy-image.sh --public --release
      • This builds the container image, tags it with the version number (e.g. 2.2.0) and latest, and pushes both tags to the public ECR repository.
      • The script will fail if the version tag already exists in public ECR (bump the version in pyproject.toml first).
      • Existing CloudFormation stacks using the public latest tag will pick up the new image on their next stack update.
    • src/crystal_on_aws/deploy-image.sh --public --dev
      • Existing CloudFormation stacks using the public dev tag will pick up the new image on their next stack update.
  • Upload the "Crystal on AWS" CloudFormation template to S3:
    • src/crystal_on_aws/deploy-cf-template.sh --public --release
      • This uploads crystal.cloudformation.yaml to the stable/ prefix in the crystal-on-aws S3 bucket, where the wiki's "Launch Stack" button points.
    • src/crystal_on_aws/deploy-cf-template.sh --public --dev
      • This uploads crystal.cloudformation.yaml to the dev/ prefix in the crystal-on-aws S3 bucket, where the wiki's "Launch Stack" button points.
  • Draft/publish a new Release on GitHub, with the same description as in the release notes, and upload the related binaries.
  • Upload to PyPI:
    • PYPI_API_TOKEN=...
    • poetry build
    • poetry publish --username __token__ --password $PYPI_API_TOKEN
  • Announce the release via blog post, Twitter, etc if desired.

Clone this wiki locally