Bump actions/checkout from 3 to 4 #37
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
# This is based on pyca/cryptography but we use cibuildwheel | |
# https://github.com/pyca/cryptography/blob/50ae9623df9181e5d08bbca0791ae69af4d3d446/.github/workflows/wheel-builder.yml | |
name: Wheel Builder | |
permissions: | |
contents: read | |
on: | |
workflow_dispatch: | |
inputs: | |
version: | |
description: The Git ref to build | |
# Do not add any non-tag push events without updating pypi-publish.yml. If | |
# you do, it'll upload wheels to PyPI. | |
push: | |
tags: | |
- "*" | |
pull_request: | |
paths: | |
- .github/workflows/wheel-builder.yml | |
- setup.py | |
- pyproject.toml | |
jobs: | |
sdist: | |
name: Build sdist | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 | |
with: | |
# The tag to build or the tag received by the tag event | |
ref: ${{ github.event.inputs.version || github.ref }} | |
persist-credentials: false | |
- run: python -m venv .venv | |
- name: Install Python dependencies | |
run: .venv/bin/pip install -U pip build | |
- name: Make sdist | |
run: .venv/bin/python -m build --sdist | |
- uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3 | |
with: | |
name: sdist | |
path: dist/*.tar.gz | |
build_wheels: | |
name: Build wheels on ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-20.04, windows-2019, macos-11] | |
steps: | |
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 | |
with: | |
# The tag to build or the tag received by the tag event | |
ref: ${{ github.event.inputs.version || github.ref }} | |
persist-credentials: false | |
- name: Build wheels | |
uses: pypa/cibuildwheel@a873dd9cbf9e3c4c73a1fd11ac31cf835f6eb502 # v2.16.0 | |
- uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3 | |
with: | |
name: wheels | |
path: ./wheelhouse/*.whl |