Skip to content

update to a59

update to a59 #94

# This workflow will upload a Python Package using Twine when a release is created
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
name: Upload Python Package
on:
push:
branches:
- main
release:
types: [published]
permissions:
contents: read
jobs:
deploy-linux:
name: Build wheels for Linux
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build wheels for Linux
env:
CIBW_ENVIRONMENT: ${{ secrets.CIBW_ENVIRONMENT }}
uses: pypa/[email protected]
- name: Upload Linux wheels as artifact
uses: actions/upload-artifact@v4
with:
name: linux-wheels
path: wheelhouse/
retention-days: 1
deploy-macos:
name: Build wheels for macOS
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: Build wheels for macOS
env:
CIBW_ENVIRONMENT: ${{ secrets.CIBW_ENVIRONMENT }}
uses: pypa/[email protected]
- name: Upload macOS wheels as artifact
uses: actions/upload-artifact@v4
with:
name: macos-wheels
path: wheelhouse/
retention-days: 1
publish:
name: Publish wheels to PyPI
runs-on: ubuntu-latest
needs: [deploy-linux, deploy-macos]
permissions:
id-token: write # Required for PyPI trusted publishing
steps:
- name: Download Linux wheels
uses: actions/download-artifact@v4
with:
name: linux-wheels
path: linux-wheels
- name: Download macOS wheels
uses: actions/download-artifact@v4
with:
name: macos-wheels
path: macos-wheels
- name: Combine wheels into a single directory
run: |
mkdir -p wheelhouse
cp linux-wheels/*.whl wheelhouse/
cp macos-wheels/*.whl wheelhouse/
- name: Publish package to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
verbose: true
packages-dir: wheelhouse/