Initial bringup of TKML #2
This file contains 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: Publish Python 🐍 distributions 📦 to PyPI and TestPyPI | |
on: | |
push: | |
branches: ["main", "development"] | |
tags: | |
- v* | |
pull_request: | |
branches: ["main", "development"] | |
jobs: | |
build-n-publish: | |
name: Build and publish Python 🐍 distributions 📦 to PyPI and TestPyPI | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@main | |
- uses: conda-incubator/setup-miniconda@v2 | |
with: | |
miniconda-version: "latest" | |
activate-environment: tkml | |
python-version: ${{ matrix.python-version }} | |
- name: Install pypa/build | |
run: >- | |
python -m pip install build --user | |
- name: Build a binary wheel and a source tarball | |
run: >- | |
python -m build --sdist --wheel --outdir dist/ toolchain | |
- name: Test wheel | |
shell: bash -el {0} | |
run: | | |
python -m pip install --upgrade pip | |
pip install dist/*.whl | |
models=$(turnkey models location --quiet) | |
turnkey $models/selftest/linear.py |