Bump actions/upload-artifact from 3 to 4 #28
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: Wheels | |
on: | |
release: | |
types: | |
- published | |
pull_request: | |
branches: | |
- main | |
env: | |
CIBW_BUILD: "cp39-* cp310-* cp311-*" | |
CIBW_SKIP: "*-win32 *-manylinux_i686 cp37-* cp38-*" | |
CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014 | |
jobs: | |
# build_wheels: | |
# name: Build ${{ matrix.python-version }} wheels on ${{ matrix.os }} | |
# runs-on: ${{ matrix.os }} | |
# strategy: | |
# fail-fast: false | |
# matrix: | |
# os: [ubuntu-latest, macos-latest, windows-latest] | |
# steps: | |
# - uses: actions/checkout@v4 | |
# with: | |
# fetch-depth: 0 | |
# # Mac / linux: | |
# - name: Set up Python ${{ matrix.python-version }} on ${{ matrix.os }} | |
# if: "!startsWith(matrix.os, 'windows')" | |
# uses: actions/setup-python@v5 | |
# with: | |
# # Note: cibuildwheel builds for many Python versions beyond this one | |
# python-version: "3.11" | |
# # Windows: | |
# - uses: conda-incubator/setup-miniconda@v3 | |
# if: startsWith(matrix.os, 'windows') | |
# with: | |
# auto-update-conda: true | |
# # Note: cibuildwheel builds for many Python versions beyond this one | |
# python-version: "3.11" | |
# - name: Build wheels | |
# run: | | |
# python -m pip install cibuildwheel | |
# python -m cibuildwheel --output-dir wheelhouse | |
# - uses: actions/upload-artifact@v4 | |
# with: | |
# path: ./wheelhouse/*.whl | |
build_sdist: | |
name: Build source distribution | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: actions/setup-python@v5 | |
name: Install Python | |
with: | |
python-version: "3.11" | |
- name: Build sdist | |
run: | | |
pip install build | |
python -m build -s . | |
- uses: actions/upload-artifact@v4 | |
with: | |
path: dist/*.tar.gz | |
upload_pypi: | |
# needs: [build_wheels, build_sdist] | |
needs: [build_sdist] | |
runs-on: ubuntu-latest | |
if: github.event_name == 'release' && github.event.action == 'published' | |
steps: | |
- uses: actions/download-artifact@v3 | |
with: | |
name: artifact | |
path: dist | |
- uses: pypa/gh-action-pypi-publish@master | |
with: | |
user: __token__ | |
password: ${{ secrets.pypi_password }} | |
# To test: repository_url: https://test.pypi.org/legacy/ |