use ci build wheel for packages #17
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: Publish Python π distribution π¦ to TestPyPI | |
on: | |
push: | |
# tags: | |
# - 'v[0-9]+.[0-9]+.[0-9]+a[0-9]+' # only run on alpha tags | |
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, macos-14] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Build wheels | |
uses: pypa/[email protected] | |
env: | |
CIBW_BEFORE_ALL_LINUX: > | |
yum update && | |
yum install -y gmp-devel | |
CIBW_BUILD: cp39-* cp310-* cp311-* cp312-* cp313-* | |
CIBW_SKIP: cp3*-musllinux_* | |
CIBW_ENVIRONMENT_LINUX: CFLAGS="-I/usr/local/include" LDFLAGS="-L/usr/local/lib" | |
CIBW_ENVIRONMENT_MACOS: CFLAGS="-I/opt/homebrew/include" LDFLAGS="-L/opt/homebrew/lib" | |
MACOSX_DEPLOYMENT_TARGET: 14.0 | |
# with: | |
# package-dir: fastecdsa | |
# output-dir: wheelhouse | |
# config-file: pyproject.toml | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }} | |
path: ./wheelhouse/*.whl | |
# publish-to-testpypi: | |
# name: Publish Python π distribution π¦ to TestPyPI | |
# needs: | |
# - build | |
# runs-on: ubuntu-latest | |
# environment: | |
# name: testpypi | |
# url: https://test.pypi.org/p/fastecdsa | |
# permissions: | |
# id-token: write # IMPORTANT: mandatory for trusted publishing | |
# steps: | |
# - name: Download all the dists | |
# uses: actions/download-artifact@v4 | |
# with: | |
# name: python-package-distributions | |
# path: dist/ | |
# - name: Publish distribution π¦ to TestPyPI | |
# uses: pypa/gh-action-pypi-publish@release/v1 | |
# with: | |
# verbose: true | |
# repository-url: https://test.pypi.org/legacy/ |