v0.3.1a6 #7
Workflow file for this run
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: CI/CD | |
on: | |
release: | |
types: [published] | |
workflow_dispatch: | |
permissions: | |
contents: read | |
jobs: | |
build_wheels: | |
name: Build wheels on ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-13, macos-14] | |
python-version: ["3.10"] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.ref }} | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install poetry | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install --upgrade setuptools cython | |
pipx install poetry | |
- name: Install dependencies | |
run: poetry install | |
- name: Build dist | |
run: poetry build --format wheel | |
- name: Upload wheels | |
uses: actions/upload-artifact@v4 | |
with: | |
name: wheels-${{ matrix.os }}-${{ matrix.python-version }} | |
path: dist/*.whl | |
build_sdist: | |
name: Build source distribution | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.ref }} | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.10" | |
- name: Install poetry | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install --upgrade setuptools cython | |
pipx install poetry | |
- name: Install dependencies | |
run: poetry install | |
- name: Build dist | |
run: poetry build --format sdist | |
- name: Upload dist | |
uses: actions/upload-artifact@v4 | |
with: | |
path: dist/*.tar.gz | |
publish-to-testpypi: | |
name: Publish package to TestPyPI | |
needs: | |
- build_wheels | |
- build_sdist | |
runs-on: ubuntu-latest | |
steps: | |
- name: Download all the dists | |
uses: actions/download-artifact@v4 | |
with: | |
path: dist | |
merge-multiple: true | |
- name: Publish in PyPI | |
env: | |
TWINE_USERNAME: __token__ | |
TWINE_PASSWORD: ${{ secrets.PYPI_ACCESS }} | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install twine | |
python -m twine upload dist/* |