Skip to content

Fix upload-artifact@v4 overwrite bug #80

Fix upload-artifact@v4 overwrite bug

Fix upload-artifact@v4 overwrite bug #80

Workflow file for this run

name: release
on:
push:
tags:
- v*
pull_request:
jobs:
builds:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/checkout@v4
with:
submodules: true
- uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Set up QEMU
if: runner.os == 'Linux'
uses: docker/setup-qemu-action@v3
with:
platforms: all
- name: Install cibuildwheel
run: python -m pip install cibuildwheel==2.16.2
- name: Build wheels
run: python -m cibuildwheel --output-dir wheelhouse
env:
CIBW_BEFORE_BUILD: pip install cython==3.0.8 && pip install -e . && python build.py
CIBW_TEST_REQUIRES: pytest
CIBW_TEST_COMMAND: pytest --showlocals {package}/tests
CIBW_SKIP: "{cp36**,pp*}"
CIBW_ARCHS_MACOS: x86_64 arm64
CIBW_ARCHS_LINUX: auto aarch64
CIBW_BUILD_VERBOSITY: 3
- uses: actions/upload-artifact@v2
with:
name: wheelhouse
path: ./wheelhouse/*.whl
upload:
# Skip this step on pull requests. Run only when pushing a version tag.
if: startsWith(github.ref, 'refs/tags/v')
needs: builds
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Stage wheels
uses: actions/download-artifact@v4
with:
name: wheelhouse
path: wheelhouse
- run: |
mkdir dist
mv -v wheelhouse/* dist/
ls -l dist/
- name: Publish package
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}