Release candidate 1 for 5.1.0 (#362) #137
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 and upload to PyPI | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
tags: | |
- "*" | |
jobs: | |
build_wheels: | |
name: Build wheels on ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-22.04, windows-2022, macos-12, macos-14] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Build wheels | |
uses: pypa/[email protected] | |
env: | |
MACOSX_DEPLOYMENT_TARGET: "10.14" | |
- uses: actions/[email protected] | |
with: | |
name: artifacts-${{ matrix.os }} | |
path: ./wheelhouse/*.whl | |
upload_pypi: | |
needs: [build_wheels] | |
runs-on: ubuntu-latest | |
environment: | |
name: release | |
url: https://pypi.org/project/pantab/ | |
permissions: | |
id-token: write | |
# if: github.event_name == 'release' && github.event.action == 'published' | |
# or, alternatively, upload to PyPI on every tag starting with 'v' (remove on: release above to use this) | |
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') | |
steps: | |
- uses: actions/[email protected] | |
with: | |
# unpacks default artifact into dist/ | |
# https://github.com/actions/upload-artifact/issues/480#issuecomment-1937762859 | |
pattern: artifacts-* | |
merge-multiple: true | |
path: dist | |
- name: Publish package distributions to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 |