mirror of
https://github.com/emmett-framework/granian.git
synced 2025-12-23 05:36:49 +00:00
118 lines
3.2 KiB
YAML
118 lines
3.2 KiB
YAML
name: release
|
|
|
|
on:
|
|
release:
|
|
types: [published]
|
|
|
|
env:
|
|
MATURIN_VERSION: 1.1.0
|
|
PY_ALL: 3.8 3.9 3.10 3.11 pypy3.8 pypy3.9
|
|
|
|
jobs:
|
|
sdist:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v4
|
|
with:
|
|
python-version: '3.10'
|
|
- uses: pyo3/maturin-action@v1
|
|
with:
|
|
maturin-version: v${{ env.MATURIN_VERSION }}
|
|
command: build
|
|
args: --release --sdist --interpreter 3.10
|
|
target: x64
|
|
manylinux: off
|
|
container: off
|
|
- name: Upload sdist
|
|
uses: actions/upload-artifact@v2
|
|
with:
|
|
name: wheels
|
|
path: target/wheels/*.tar.gz
|
|
|
|
wheel-unix:
|
|
name: wheel ${{ matrix.platform || matrix.os }}(${{ matrix.target }}) - ${{ matrix.manylinux || 'auto' }}
|
|
runs-on: ${{ matrix.os }}-latest
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
os: [ubuntu, macos]
|
|
target: [x86_64, aarch64]
|
|
manylinux: [auto]
|
|
include:
|
|
- os: ubuntu
|
|
platform: linux
|
|
- os: macos
|
|
interpreter: 3.8 3.9 3.10 3.11 pypy3.9
|
|
- os: ubuntu
|
|
platform: linux
|
|
target: aarch64
|
|
container: messense/manylinux_2_24-cross:aarch64
|
|
- os: ubuntu
|
|
platform: linux
|
|
target: x86_64
|
|
manylinux: musllinux_1_1
|
|
- os: ubuntu
|
|
platform: linux
|
|
target: aarch64
|
|
manylinux: musllinux_1_1
|
|
exclude:
|
|
- os: windows
|
|
target: aarch64
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: pyo3/maturin-action@v1
|
|
with:
|
|
maturin-version: v${{ env.MATURIN_VERSION }}
|
|
command: build
|
|
args: --release --interpreter ${{ matrix.interpreter || env.PY_ALL }}
|
|
target: ${{ matrix.target }}
|
|
manylinux: ${{ matrix.manylinux || 'auto' }}
|
|
container: ${{ matrix.container }}
|
|
- name: Upload wheels
|
|
uses: actions/upload-artifact@v2
|
|
with:
|
|
name: wheels
|
|
path: target/wheels
|
|
|
|
wheel-win:
|
|
runs-on: windows-latest
|
|
env:
|
|
PY_ALL: 3.8 3.9 3.10 3.11 C:\hostedtoolcache\windows\PyPy\3.9.17\x86\python3.exe
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions/setup-python@v4
|
|
with:
|
|
python-version: pypy3.9
|
|
- uses: pyo3/maturin-action@v1
|
|
with:
|
|
maturin-version: v${{ env.MATURIN_VERSION }}
|
|
command: build
|
|
args: --release --interpreter ${{ env.PY_ALL }}
|
|
target: x86_64
|
|
manylinux: auto
|
|
- name: Upload wheels
|
|
uses: actions/upload-artifact@v2
|
|
with:
|
|
name: wheels
|
|
path: target/wheels
|
|
|
|
release:
|
|
runs-on: ubuntu-latest
|
|
needs: [ sdist, wheel-unix, wheel-win ]
|
|
steps:
|
|
- uses: actions/download-artifact@v2
|
|
with:
|
|
name: wheels
|
|
- uses: actions/setup-python@v4
|
|
with:
|
|
python-version: '3.10'
|
|
- name: Publish to PyPi
|
|
env:
|
|
TWINE_USERNAME: __token__
|
|
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
|
|
run: |
|
|
pip install --upgrade pip twine
|
|
twine upload --skip-existing *
|