Skip to content

Removed dynamic versioning for now. #10

Removed dynamic versioning for now.

Removed dynamic versioning for now. #10

Workflow file for this run

name: Build and Publish
on: [push, pull_request, workflow_dispatch]
jobs:
build_wheels:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest] # , windows-latest, macos-13, macos-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Fetch all history for all tags and branches
- uses: actions/setup-python@v5
- name: Generate BUILD_NUMBER
id: build_number
run: |
echo "BUILD_NUMBER=$(git rev-list --count HEAD)" >> $GITHUB_ENV
- name: Install cibuildwheel
run: python -m pip install cibuildwheel==2.21.3
- name: Build wheels
env:
BUILD_NUMBER: ${{ env.BUILD_NUMBER }}
run: python -m cibuildwheel --output-dir wheelhouse
- uses: actions/upload-artifact@v4
with:
name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }}
path: ./wheelhouse/*.whl
pypi-publish:
name: Upload release to PyPI
needs: build_wheels
runs-on: ubuntu-latest
environment: release
permissions:
id-token: write
#if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
steps:
- uses: actions/download-artifact@v4
with:
pattern: cibw-wheels-*
path: dist
merge-multiple: true
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1