Skip to content

github-deploy.yml: fix artifact naming #104

github-deploy.yml: fix artifact naming

github-deploy.yml: fix artifact naming #104

Workflow file for this run

name: Build wheels and sdist, publish to PyPI
on: [push, pull_request]
jobs:
build_wheels:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
# macos-13 is an intel runner, macos-14 is apple silicon
os: [ubuntu-latest, windows-latest, macos-13, macos-14]
fail-fast: false
steps:
- uses: actions/checkout@v4
- name: Fetch tags
run: |
git fetch --prune --unshallow --tags -f
echo exit code $?
git tag --list
- name: Build wheels
uses: pypa/cibuildwheel@v2.18
- uses: actions/upload-artifact@v4
with:
name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }}
path: ./wheelhouse/*.whl
build_sdist:
name: Build source distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Fetch tags
run: |
git fetch --prune --unshallow --tags -f
echo exit code $?
git tag --list
- uses: actions/setup-python@v5
name: Install Python
with:
python-version: '3.8'
- name: Build sdist
run: pip install numpy && python setup.py sdist
- uses: actions/upload-artifact@v4
with:
name: cibw-sdist
path: dist/*.tar.gz
publish-to-pypi:
name: Publish to PyPI
# upload to PyPI on every tag starting with 'v'
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v')
needs: [build_wheels, build_sdist]
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/stockwell
permissions:
id-token: write
steps:
- name: Download all the artifacts
uses: actions/download-artifact@v4
with:
pattern: cibw-*
path: dist
merge-multiple: true
- name: Publish distribution 📦 to PyPI
uses: pypa/gh-action-pypi-publish@release/v1