Skip to content
Open
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 0 additions & 61 deletions .github/workflows/deploy-mito-ai.yml

This file was deleted.

111 changes: 0 additions & 111 deletions .github/workflows/deploy-mitosheet-mitoinstaller.yml

This file was deleted.

167 changes: 167 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,167 @@
name: Deploy All Packages
on:
push:
branches:
- main
workflow_dispatch:
inputs:
version_type:
description: 'Version bump type'
required: true
default: 'patch'
type: choice
options:
- patch
- minor
- major
specific_version:
description: 'Specific version (optional, overrides version_type)'
required: false
type: string

jobs:
deploy-all:
name: Deploy all packages with unified SemVer
runs-on: ubuntu-24.04
strategy:
matrix:
python-version: [3.11]
Copy link
Preview

Copilot AI Jun 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] The CI matrix only tests Python 3.11, but the project supports >=3.9. Consider expanding the matrix to include 3.9, 3.10, and 3.12 for broader compatibility.

Suggested change
python-version: [3.11]
python-version: [3.9, 3.10, 3.11, 3.12]

Copilot uses AI. Check for mistakes.

steps:
- name: Extract branch name
shell: bash
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
Copy link
Preview

Copilot AI Jun 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The set-output command is deprecated in GitHub Actions. Use the environment file or $GITHUB_OUTPUT instead, e.g., echo "branch=$(...)" >> $GITHUB_ENV.

Suggested change
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
run: echo "branch=$(echo ${GITHUB_REF#refs/heads/})" >> $GITHUB_OUTPUT

Copilot uses AI. Check for mistakes.

id: extract_branch

- uses: actions/checkout@v4
with:
ref: ${{ steps.extract_branch.outputs.branch }}
token: ${{ secrets.GITHUB_TOKEN }}

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- uses: actions/setup-node@v4
with:
node-version: 22

- name: Setup Auth for PyPi
run: |
echo -e "[distutils]" >> ~/.pypirc
echo -e "index-servers =" >> ~/.pypirc
echo -e " pypi" >> ~/.pypirc
echo -e " testpypi" >> ~/.pypirc
echo -e "[pypi]" >> ~/.pypirc
echo -e "repository = https://upload.pypi.org/legacy/" >> ~/.pypirc
echo -e "username = __token__" >> ~/.pypirc
echo -e "password = ${{ secrets.PYPI_API_TOKEN }}" >> ~/.pypirc
echo -e "" >> ~/.pypirc
echo -e "[testpypi]" >> ~/.pypirc
echo -e "repository = https://test.pypi.org/legacy/" >> ~/.pypirc
echo -e "username = __token__" >> ~/.pypirc
echo -e "password = ${{ secrets.TEST_PYPI_API_TOKEN }}" >> ~/.pypirc

- name: Bump versions
run: |
if [[ -n "${{ inputs.specific_version }}" ]]; then
python deployment/bump_version.py "${{ inputs.specific_version }}"
else
python deployment/bump_version.py "${{ inputs.version_type || 'patch' }}"
fi

- name: Get new version
id: version
run: |
NEW_VERSION=$(python -c "import json; print(json.load(open('version.json'))['version'])")
echo "NEW_VERSION=$NEW_VERSION" >> $GITHUB_ENV
echo "version=$NEW_VERSION" >> $GITHUB_OUTPUT

- name: Verify version consistency
run: |
echo "Verifying all packages have consistent versions..."
python deployment/check_versions.py

- name: Setup and build mitosheet
run: |
cd mitosheet
rm -rf venv
python3 -m venv venv
source venv/bin/activate
python -m pip install -e ".[deploy]"
jlpm install
jlpm run build

- name: Setup and build mito-ai
run: |
cd mito-ai
rm -rf venv
python3 -m venv venv
source venv/bin/activate
python -m pip install --upgrade pip
python -m pip install -e ".[deploy]" --verbose
python -m pip check
jlpm install --frozen-lockfile
jlpm run build

- name: Setup mito metapackage
run: |
cd mito
python -m pip install --upgrade pip
pip install build twine hatchling

- name: Deploy mitosheet
run: |
cd mitosheet
source venv/bin/activate
python setup.py sdist bdist_wheel
twine upload dist/*

- name: Deploy mito-ai
run: |
cd mito-ai
source venv/bin/activate
python -m build --sdist --wheel
twine upload dist/*

- name: Deploy mito metapackage
run: |
cd mito
rm -rf dist/
python -m build --sdist --wheel
twine upload dist/*

- name: Commit version changes
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git add version.json
git add mito/pyproject.toml
git add mitosheet/package.json
git add mito-ai/package.json
git commit -m "Bump version to $NEW_VERSION [skip ci]" || exit 0
git push

- name: Create Git Tag
run: |
git tag -a "v$NEW_VERSION" -m "Release version $NEW_VERSION"
git push origin "v$NEW_VERSION"

- name: Create GitHub Release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: v${{ env.NEW_VERSION }}
release_name: Release v${{ env.NEW_VERSION }}
body: |
## Release v${{ env.NEW_VERSION }}

This release includes updates to all Mito packages:
- mitosheet v${{ env.NEW_VERSION }}
- mito-ai v${{ env.NEW_VERSION }}
- mito v${{ env.NEW_VERSION }}

All packages now use unified SemVer versioning.
draft: false
prerelease: false
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,13 @@ Mito is an open source tool (look around...), and will always be built by and fo
## ⚑️ Install Mito
To get started, open a terminal, command prompt, or Anaconda Prompt. Then, run the command
```
python -m pip install mito-ai mitosheet
pip install mito
```
Then launch Jupyter by running the command
```
jupyter lab
```
This will install Mito for JupyterLab 4.0. More detailed installation instructions can also be found [here](https://docs.trymito.io/getting-started/installing-mito).
This will install Mito for JupyterLab 4.0+. For more detailed installation instructions, troubleshooting, and setup guides, visit our [documentation](https://docs.trymito.io/getting-started/installing-mito).

## πŸ“š Documentation
You can find all [Mito documentation available here](https://docs.trymito.io).
Expand Down
Loading
Loading