Skip to content

Add slurm Ci test back (#46) #23

Add slurm Ci test back (#46)

Add slurm Ci test back (#46) #23

name: Publish Python distributions to PyPI
on:
push:
branches: ["main", "canary"]
tags:
- v*
pull_request:
branches: ["main", "canary"]
jobs:
build-n-publish:
name: Build and publish Python distributions to PyPI
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/ .
- 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
- name: Publish distribution package to PyPI
if: startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}