aioesphomeapi/.github/workflows/release.yml

71 lines
1.6 KiB
YAML
Raw Normal View History

2020-07-14 19:43:19 +02:00
name: Publish Release
on:
release:
types: [published]
permissions:
contents: read
2020-07-14 19:43:19 +02:00
jobs:
build_wheels:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-22.04]
steps:
- uses: actions/checkout@v4
2023-11-08 22:44:59 +01:00
- name: Set up QEMU
if: runner.os == 'Linux'
2023-11-08 23:43:38 +01:00
uses: docker/setup-qemu-action@v3
2023-11-08 22:44:59 +01:00
with:
2023-11-08 22:47:40 +01:00
platforms: arm64
2023-11-08 22:44:59 +01:00
- name: Build wheels
uses: pypa/cibuildwheel@v2.21.2
env:
2023-11-11 21:10:57 +01:00
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
2023-11-08 22:44:59 +01:00
CIBW_ARCHS_LINUX: auto aarch64
REQUIRE_CYTHON: 1
2024-08-28 01:25:37 +02:00
- uses: actions/upload-artifact@v4
with:
2024-08-28 01:25:37 +02:00
name: wheels
path: ./wheelhouse/*.whl
build_sdist:
name: Build source distribution
2020-07-14 19:43:19 +02:00
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build sdist
run: pipx run build --sdist
2024-08-28 01:25:37 +02:00
- uses: actions/upload-artifact@v4
with:
2024-08-28 01:25:37 +02:00
name: sdist
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:
2024-04-17 00:26:39 +02:00
- name: Download artifacts
2024-08-28 01:25:37 +02:00
uses: actions/download-artifact@v4
with:
path: dist
2024-08-28 01:25:37 +02:00
merge-multiple: true
2024-04-17 00:26:39 +02:00
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@v1.10.2