Skip to content

Build and Release Python Wheels #25

Build and Release Python Wheels

Build and Release Python Wheels #25

---
name: Build and Release Python Wheels
on:
release:
types: [published]
tags:
- 'v*' # Push events to matching v*, i.e. v1.0.0, v2.0.0, ...
jobs:
build_wheels:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
steps:
- uses: actions/checkout@v4
# Used to host cibuildwheel
- uses: actions/setup-python@v5
- name: Install Rust
run: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
# - name: Install cibuildwheel
# run: python -m pip install cibuildwheel==2.17.0
- name: Build wheel
run: pip wheel -w dist .
# - name: Build wheel
# run: python -m cibuildwheel --output-dir dist
# # to supply options, put them in 'env', like:
# # env:
# # CIBW_SOME_OPTION: value
# - uses: actions/upload-artifact@v4
# with:
# name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }}
# path: ./dist/*.whl
- uses: actions/upload-artifact@v4
with:
# name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }}
name: tt-flash
path: ./dist/*.whl
# publish_wheels:
# needs: build_wheels
# environment: pypi
# permissions:
# id-token: write
# runs-on: ubuntu-latest
# if: github.event_name == 'release' && github.event.action == 'published'
# steps:
# - uses: actions/download-artifact@v4
# with:
# pattern: cibw-*
# path: dist
# merge-multiple: true
# - name: Publish package
# uses: pypa/gh-action-pypi-publish@v1.8.11
# with:
# user: __token__
# password: ${{ secrets.PYPI_API_TOKEN }}