v0.3.7 #18
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: Publish to Test PyPi | |
on: | |
workflow_dispatch: | |
release: | |
types: [published] | |
jobs: | |
build_sdist: | |
name: Build sdist 📦 | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: 3.12 | |
- name: Build a source tarball | |
run: | | |
python -m pip install --upgrade pip | |
python3 -m pip install numpy | |
python3 -m pip install setuptools | |
python3 -m pip install setuptools-scm | |
python3 setup.py sdist | |
- name: Store the distribution packages | |
uses: actions/upload-artifact@v4 | |
with: | |
name: sdist | |
path: dist/ | |
build_wheels: | |
name: Build wheels on ${{matrix.os}} 🎡 | |
strategy: | |
matrix: | |
# os: [ubuntu-latest, windows-latest, macos-13, macos-14] | |
os: [ubuntu-latest, windows-latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Build wheels 🎡 | |
env: | |
CIBW_BUILD: 'cp38-* cp39-* cp310-* cp311-* cp312-* cp313-*' | |
CIBW_SKIP: "pp* *-win32 *_i686" | |
uses: pypa/[email protected] | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }} | |
path: ./wheelhouse/*.whl | |
upload_pypi: | |
needs: [build_sdist, build_wheels] | |
runs-on: ubuntu-latest | |
environment: | |
name: pypi | |
url: https://test.pypi.org/p/transforms84 | |
permissions: | |
id-token: write | |
# upload to pypi only on release, not on manual dispatch | |
if: github.event_name == 'release' && github.event.action == 'published' | |
steps: | |
- uses: actions/download-artifact@v4 | |
with: | |
# unpacks all CIBW artifacts into dist/ | |
pattern: cibw-* | |
path: dist | |
merge-multiple: true | |
- uses: actions/download-artifact@v4 | |
with: | |
pattern: sdist | |
- uses: pypa/gh-action-pypi-publish@release/v1 | |
# with: | |
# repository-url: https://pypi.org/legacy/ |