Skip to content

Publish to TestPyPI

Publish to TestPyPI #7

name: Publish to TestPyPI
on:
workflow_dispatch:
jobs:
build-n-publish:
name: Build and publish distribution to TestPyPI
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
fetch-depth: 0 # deep clone for setuptools-scm
- uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Install pypa/build
run: |
python3 -m pip install --upgrade pip
pip3 install setuptools setuptools_scm cmake wheel scikit-build ninja
- name: Build a source tarball
run: |
cd python
cp -r ../src .
python3 setup.py sdist
- name: Publish distribution 📦 to Test PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
repository-url: https://test.pypi.org/legacy/
packages-dir: python/dist/