Skip to content

Textnets version 0.9.4 #32

Textnets version 0.9.4

Textnets version 0.9.4 #32

Workflow file for this run

# This workflow will upload a Python Package using Twine when a release is created
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries
name: textnets PyPI upload
on:
release:
types: [published, edited]
jobs:
build_wheels:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- name: Set up QEMU
if: runner.os == 'Linux'
uses: docker/setup-qemu-action@v3
with:
platforms: all
- uses: actions/checkout@v4
- name: Install poetry
run: python -m pip install poetry
- name: Build wheels
uses: pypa/cibuildwheel@v2.16.2
env:
CIBW_BUILD: cp39-* cp310-* cp311-* cp312-* pp39-* pp310-*
CIBW_ARCHS_LINUX: "auto aarch64"
CIBW_ARCHS_MACOS: "arm64" # removed x86_64 to avoid AlreadyBuiltWheelError
- uses: actions/upload-artifact@v3
with:
path: ./wheelhouse/*.whl
build_sdist:
name: Build source distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install poetry
run: python -m pip install poetry
- name: Build sdist
run: poetry build --format=sdist
- uses: actions/upload-artifact@v4
with:
path: ./dist/*.tar.gz
deploy:
needs: [build_wheels, build_sdist]
runs-on: ubuntu-latest
steps:
- name: Gather build artifacts
uses: actions/download-artifact@v4
with:
name: artifact
path: dist
- name: Upload to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
verbose: true