Skip to content

v0.1.0

v0.1.0 #4

Workflow file for this run

name: Publish Python 🐍 distribution πŸ“¦ to TestPyPI
on:
push:
branches: [main]
pull_request:
branches: [main]
release:
types: [published]
jobs:
build_wheels:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: ["3.9", "3.11", "3.12"]
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/checkout@v6
- uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- run: pip install cibuildwheel
- run: cibuildwheel --output-dir wheelhouse
- uses: actions/upload-artifact@v5
with:
name: wheels-${{ matrix.os }}-py${{ matrix.python-version }}
path: wheelhouse/*.whl
build_sdist:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- run: pip install build
- run: python -m build --sdist
- uses: actions/upload-artifact@v5
with:
name: sdist
path: dist/*.tar.gz
publish:
name: >-
Publish Python 🐍 distribution πŸ“¦ to TestPyPI
needs: [build_wheels, build_sdist]
runs-on: ubuntu-latest
if: github.event_name == 'release'
environment:
name: testpypi
url: https://test.pypi.org/project/farms-foo/
permissions:
id-token: write
steps:
- name: Download all the dists
uses: actions/download-artifact@v6
with:
path: dist/
merge-multiple: true
- name: Publish distribution πŸ“¦ to TestPyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/