mirror of
https://github.com/esphome/aioesphomeapi.git
synced 2024-11-30 13:23:21 +01:00
c73ad7fbe0
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
69 lines
1.6 KiB
YAML
69 lines
1.6 KiB
YAML
name: Publish Release
|
|
|
|
on:
|
|
release:
|
|
types: [published]
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
build_wheels:
|
|
name: Build wheels on ${{ matrix.os }}
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
matrix:
|
|
os: [ubuntu-22.04]
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Set up QEMU
|
|
if: runner.os == 'Linux'
|
|
uses: docker/setup-qemu-action@v3
|
|
with:
|
|
platforms: arm64
|
|
|
|
- name: Build wheels
|
|
uses: pypa/cibuildwheel@v2.19.0
|
|
env:
|
|
CIBW_SKIP: cp36-* cp37-* cp38-* cp39-* cp310-* pp* *musllinux*
|
|
CIBW_BEFORE_ALL_LINUX: apt-get install -y gcc || yum install -y gcc || apk add gcc
|
|
CIBW_BUILD_VERBOSITY: 3
|
|
CIBW_ARCHS_LINUX: auto aarch64
|
|
REQUIRE_CYTHON: 1
|
|
|
|
- uses: actions/upload-artifact@v3
|
|
with:
|
|
path: ./wheelhouse/*.whl
|
|
|
|
build_sdist:
|
|
name: Build source distribution
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Build sdist
|
|
run: pipx run build --sdist
|
|
|
|
- uses: actions/upload-artifact@v3
|
|
with:
|
|
path: dist/*.tar.gz
|
|
|
|
upload_pypi:
|
|
needs: [build_wheels, build_sdist]
|
|
runs-on: ubuntu-latest
|
|
environment: pypi
|
|
permissions:
|
|
id-token: write
|
|
if: github.event_name == 'release' && github.event.action == 'published'
|
|
steps:
|
|
- name: Download artifacts
|
|
uses: actions/download-artifact@v3
|
|
with:
|
|
name: artifact
|
|
path: dist
|
|
|
|
- name: Publish to PyPI
|
|
uses: pypa/gh-action-pypi-publish@v1.9.0
|