Initial release: OVERTLI Studio V1 #11
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Release Package | |
| on: | |
| workflow_dispatch: | |
| push: | |
| tags: | |
| - "v*" | |
| jobs: | |
| validate: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r requirements.txt | |
| - name: Compile check | |
| run: python -m compileall -q . | |
| - name: Run unittests | |
| run: python -m unittest discover -s supplementary_docs/tests -p "test_*.py" -v | |
| package: | |
| runs-on: ubuntu-latest | |
| needs: validate | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Build release zip | |
| run: | | |
| python - <<'PY' | |
| import pathlib | |
| import zipfile | |
| root = pathlib.Path('.') | |
| dist = root / 'dist' | |
| dist.mkdir(exist_ok=True) | |
| zip_path = dist / 'overtli-studio-suite-release.zip' | |
| skip_prefixes = { | |
| '.git/', | |
| '__pycache__/', | |
| '.pytest_cache/', | |
| '.mypy_cache/', | |
| '.ruff_cache/', | |
| 'memory_bank/', | |
| 'supplementary_docs/', | |
| 'release/', | |
| 'dist/', | |
| } | |
| skip_suffixes = {'.pyc', '.pyo'} | |
| def include(path: pathlib.Path) -> bool: | |
| rel = path.as_posix() | |
| if any(rel.startswith(prefix) for prefix in skip_prefixes): | |
| return False | |
| if path.suffix.lower() in skip_suffixes: | |
| return False | |
| return True | |
| with zipfile.ZipFile(zip_path, 'w', compression=zipfile.ZIP_DEFLATED) as archive: | |
| for file_path in root.rglob('*'): | |
| if not file_path.is_file(): | |
| continue | |
| rel = file_path.relative_to(root) | |
| if include(rel): | |
| archive.write(file_path, rel.as_posix()) | |
| print(f'Created {zip_path}') | |
| PY | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: overtli-studio-suite-release | |
| path: dist/overtli-studio-suite-release.zip |