v1.3.6 #88
Workflow file for this run
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
# adapted from: https://github.com/pypa/cibuildwheel/tree/main/examples | |
name: Release | |
on: | |
release: | |
types: [ published ] | |
workflow_dispatch: | |
defaults: | |
run: | |
shell: bash -l {0} | |
jobs: | |
build_wheels_and_sdist: | |
name: Build wheels on ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ ubuntu-20.04, macOS-11, windows-2019 ] | |
fail-fast: false | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-tags: 'true' | |
fetch-depth: 0 | |
- name: Set up QEMU | |
if: runner.os == 'Linux' | |
uses: docker/setup-qemu-action@v2 | |
with: | |
platforms: all | |
- name: Build wheels | |
uses: pypa/[email protected] | |
with: | |
package-dir: . | |
output-dir: wheelhouse | |
config-file: "pyproject.toml" | |
- name: Set up Python | |
if: ${{ matrix.os == 'ubuntu-20.04' }} | |
uses: actions/[email protected] | |
with: | |
python-version: '3.9' | |
- name: Build source distribution | |
if: ${{ matrix.os == 'ubuntu-20.04' }} | |
run: | | |
python -m pip install --upgrade pip build | |
python -m build --sdist | |
mv dist/*.gz wheelhouse | |
- name: Store the wheelhouse directory | |
uses: actions/upload-artifact@v3 | |
with: | |
name: wheels_and_sdist | |
path: wheelhouse | |
if-no-files-found: error | |
upload_pypi: | |
needs: [ build_wheels_and_sdist ] | |
runs-on: ubuntu-20.04 | |
environment: | |
name: pypi | |
url: https://pypi.org/p/polyagamma | |
permissions: | |
id-token: write | |
steps: | |
- name: Pull built wheels and sdist | |
uses: actions/download-artifact@v3 | |
with: | |
name: wheels_and_sdist | |
path: wheelhouse | |
- name: Publish to PyPI | |
uses: pypa/[email protected] | |
with: | |
packages_dir: wheelhouse |