fix: build wheels from the sha saved after release (#64)
This commit is contained in:
parent
d3be3855ae
commit
faee18172b
63
.github/workflows/ci.yml
vendored
63
.github/workflows/ci.yml
vendored
@ -96,3 +96,66 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
pypi_token: ${{ secrets.PYPI_TOKEN }}
|
pypi_token: ${{ secrets.PYPI_TOKEN }}
|
||||||
|
|
||||||
|
- name: Save Release SHA
|
||||||
|
id: release_sha
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
echo "::set-output name=saved_release_sha::$(git rev-parse --short HEAD)"
|
||||||
|
|
||||||
|
build_wheels:
|
||||||
|
needs: [release]
|
||||||
|
|
||||||
|
name: Build wheels on ${{ matrix.os }}
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
os: [ubuntu-20.04]
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
ref: ${{ steps.release_sha.outputs.saved_release_sha }}
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: Install poetry
|
||||||
|
run: pipx install poetry
|
||||||
|
# Used to host cibuildwheel
|
||||||
|
- name: Set up Python
|
||||||
|
uses: actions/setup-python@v4
|
||||||
|
|
||||||
|
- name: Install cibuildwheel
|
||||||
|
run: python -m pip install cibuildwheel==2.10.2
|
||||||
|
|
||||||
|
- name: Build wheels
|
||||||
|
run: python -m cibuildwheel --output-dir wheelhouse
|
||||||
|
# to supply options, put them in 'env', like:
|
||||||
|
env:
|
||||||
|
CIBW_SKIP: cp36-*
|
||||||
|
CIBW_BEFORE_ALL_LINUX: apt-get install -y gcc || yum install -y gcc || apk add gcc
|
||||||
|
CIBW_BUILD_VERBOSITY: 3
|
||||||
|
REQUIRE_CYTHON: 1
|
||||||
|
|
||||||
|
- uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
path: ./wheelhouse/*.whl
|
||||||
|
|
||||||
|
upload_pypi:
|
||||||
|
needs: [build_wheels]
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
environment: release
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/download-artifact@v3
|
||||||
|
with:
|
||||||
|
# unpacks default artifact into dist/
|
||||||
|
# if `name: artifact` is omitted, the action will create extra parent dir
|
||||||
|
name: artifact
|
||||||
|
path: dist
|
||||||
|
|
||||||
|
- uses: pypa/gh-action-pypi-publish@v1.5.0
|
||||||
|
with:
|
||||||
|
user: __token__
|
||||||
|
password: ${{ secrets.PYPI_TOKEN }}
|
||||||
|
|
||||||
|
# To test: repository_url: https://test.pypi.org/legacy/
|
||||||
|
|||||||
62
.github/workflows/wheels.yml
vendored
62
.github/workflows/wheels.yml
vendored
@ -1,62 +0,0 @@
|
|||||||
name: Wheels
|
|
||||||
|
|
||||||
on:
|
|
||||||
create:
|
|
||||||
tags:
|
|
||||||
- "v*"
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build_wheels:
|
|
||||||
name: Build wheels on ${{ matrix.os }}
|
|
||||||
runs-on: ${{ matrix.os }}
|
|
||||||
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
os: [ubuntu-20.04]
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
|
|
||||||
- name: Install poetry
|
|
||||||
run: pipx install poetry
|
|
||||||
# Used to host cibuildwheel
|
|
||||||
- name: Set up Python
|
|
||||||
uses: actions/setup-python@v4
|
|
||||||
|
|
||||||
- name: Install cibuildwheel
|
|
||||||
run: python -m pip install cibuildwheel==2.10.2
|
|
||||||
|
|
||||||
- name: Build wheels
|
|
||||||
run: python -m cibuildwheel --output-dir wheelhouse
|
|
||||||
# to supply options, put them in 'env', like:
|
|
||||||
env:
|
|
||||||
CIBW_SKIP: cp36-*
|
|
||||||
CIBW_BEFORE_ALL_LINUX: apt-get install -y gcc || yum install -y gcc || apk add gcc
|
|
||||||
CIBW_BUILD_VERBOSITY: 3
|
|
||||||
REQUIRE_CYTHON: 1
|
|
||||||
|
|
||||||
- uses: actions/upload-artifact@v3
|
|
||||||
with:
|
|
||||||
path: ./wheelhouse/*.whl
|
|
||||||
|
|
||||||
upload_pypi:
|
|
||||||
needs: [build_wheels]
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
environment: release
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/download-artifact@v3
|
|
||||||
with:
|
|
||||||
# unpacks default artifact into dist/
|
|
||||||
# if `name: artifact` is omitted, the action will create extra parent dir
|
|
||||||
name: artifact
|
|
||||||
path: dist
|
|
||||||
|
|
||||||
- uses: pypa/gh-action-pypi-publish@v1.5.0
|
|
||||||
with:
|
|
||||||
user: __token__
|
|
||||||
password: ${{ secrets.PYPI_TOKEN }}
|
|
||||||
|
|
||||||
# To test: repository_url: https://test.pypi.org/legacy/
|
|
||||||
Loading…
x
Reference in New Issue
Block a user