PyPI-wheel #4
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: PyPI-wheel | |
on: | |
release: | |
types: | |
# Note: editing the prerelease then marking as release does not trigger | |
# this pipeline | |
# - prereleased | |
- released | |
workflow_dispatch: | |
jobs: | |
release-pypi-linux: | |
runs-on: ubuntu-latest | |
env: | |
img: pyscf/gpu4pyscf-sdk:0.1 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Build wheels | |
run: | | |
docker run --rm -v ${{ github.workspace }}:/src/gpu4pyscf:rw --workdir=/src/gpu4pyscf \ | |
${{ env.img }} \ | |
bash -exc 'sh /src/gpu4pyscf/build.sh' | |
- name: List available wheels | |
run: | | |
ls ${{ github.workspace }}/output | |
- name: Publish to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
user: __token__ | |
password: ${{ secrets.PYPI_API_TOKEN }} | |
packages-dir: ${{ github.workspace }}/output | |
verbose: true | |
release-pypi-cibuildwheel: | |
name: Build wheels with cibuildwheel | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Build wheels | |
uses: pypa/cibuildwheel@v2.14.1 | |
env: | |
CIBW_BUILD: cp39-manylinux_x86_64 | |
with: | |
output-dir: linux-wheels | |
- name: List available wheels | |
run: | | |
ls ${{ github.workspace }}/linux-wheels | |
- name: Upload to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
user: __token__ | |
password: ${{ secrets.PYPI_API_TOKEN }} | |
packages-dir: ${{ github.workspace }}/linux-wheels | |
verbose: true |