Skip to content

come back

come back #46

Workflow file for this run

name: Test wheel build without pypi upload
# Build on every branch push, tag push, and pull request change:
#on: [push]
# Alternatively, to publish when a (published) GitHub Release is created, use the following:
on:
push:
branches:
- testing
- fix_ci
jobs:
build_wheels:
name: Build distribution on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest, macos-latest]
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-python@v3
name: Install Python
with:
python-version: 3.9
- name: Install cibuildwheel
run: |
python -m pip install cibuildwheel==2.16.2
- name: Build wheels
run: |
python -m cibuildwheel --output-dir wheelhouse
- uses: actions/upload-artifact@v3
with:
name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }}
path: dist/
build_sdist:
name: Build source distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Build sdist
run: pipx run build --sdist
- uses: actions/upload-artifact@v3
with:
name: cibw-sdist
path: dist/
upload_pypi:
name: upload to TestPyPi
needs: [build_wheels, build_sdist]
runs-on: ubuntu-latest
environment: testpypi
permissions:
id-token: write
# upload to PyPI on every tag starting with 'v'
#if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
# alternatively, to publish when a GitHub Release is created, use the following rule:
steps:
- uses: actions/download-artifact@v3
with:
# unpacks all CIBW artifacts into dist/
pattern: cibw-*
path: dist
merge-multiple: true
- uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/