Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 49 additions & 4 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,31 @@ jobs:
name: wheels-${{ matrix.os }}
path: wheelhouse

build_sdist:
name: Build source distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
repository: 'da-wad/zfp'
ref: '1.0.1'
fetch-depth: 0

- uses: actions/setup-python@v5
with:
python-version: "3.11"

- name: Install build dependencies
run: python -m pip install build

- name: Build sdist
run: python -m build --sdist

- uses: actions/upload-artifact@v4
with:
name: sdist
path: dist

# upload weels as a single artefact
upload-wheels:
needs: build_wheels
Expand All @@ -95,20 +120,40 @@ jobs:
pattern: wheels-*
separate-directories: false
delete-merged: false

# upload sdist as a single artifact
upload-sdist:
needs: build_sdist
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v4
with:
name: sdist
path: sdist

- uses: actions/upload-artifact@v4
with:
name: sdist-final
path: sdist

publish:
needs: upload-wheels
needs: [upload-wheels, upload-sdist]
name: Publish wheels to PyPI
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v4
with:
name: wheels
path: wheelhouse
path: dist

- uses: actions/download-artifact@v4
with:
name: sdist-final
path: dist

- name: Publish wheels to PyPI
- name: Publish wheels and sdist to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}
packages-dir: wheelhouse
packages-dir: dist
skip-existing: true
Loading