chore: bump actions/download-artifact from 3 to 4 #42
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
name: Build & Publish | |
on: | |
pull_request: | |
paths: | |
- ".github/workflows/build-and-publish.yml" | |
- "setup.*" | |
workflow_dispatch: | |
inputs: | |
branch: | |
description: "The branch, tag or SHA to release from" | |
required: true | |
default: "master" | |
jobs: | |
os-built-distributions: | |
name: Build on ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, windows-latest, macos-latest] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.event.inputs.branch }} | |
submodules: true | |
- name: Install Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.x" | |
- name: Install build dependencies | |
run: python -m pip install --upgrade cibuildwheel | |
- name: Build wheels | |
run: python -m cibuildwheel | |
env: | |
CIBW_SKIP: "cp36-*" # skip 3.6 | |
CIBW_ARCHS_MACOS: "x86_64 universal2 arm64" | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: python-package-distributions | |
path: ./wheelhouse/*.whl | |
source-distribution: | |
name: Build source distribution | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.event.inputs.branch }} | |
submodules: true | |
- name: Install Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.x" | |
- name: Build source distribution | |
run: python setup.py sdist | |
- name: Store the source distribution | |
uses: actions/upload-artifact@v3 | |
with: | |
name: python-package-distributions | |
path: dist | |
retention-days: 4 | |
publish: | |
needs: | |
- os-built-distributions | |
- source-distribution | |
runs-on: ubuntu-latest | |
steps: | |
- name: Download all the dists | |
uses: actions/download-artifact@v4 | |
with: | |
name: python-package-distributions | |
path: dist/ | |
- name: What will we publish? | |
run: ls -l dist | |
- name: Publish | |
if: github.event.inputs.branch != '' | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
user: __token__ | |
password: ${{ secrets.PYPI_API_TOKEN }} | |
skip_existing: true |