From 66b614400d201bfc1e443d5259e3f8ec3b602fef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?The=CC=81o=20Monnom?= Date: Tue, 7 Nov 2023 14:06:32 -0800 Subject: [PATCH] CI --- .github/workflows/build-api.yml | 3 -- .github/workflows/build-protocol.yml | 61 ++++++++++++++++++++++++++++ 2 files changed, 61 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/build-protocol.yml diff --git a/.github/workflows/build-api.yml b/.github/workflows/build-api.yml index 0cca12c0..6ea87597 100644 --- a/.github/workflows/build-api.yml +++ b/.github/workflows/build-api.yml @@ -30,9 +30,6 @@ jobs: run: | pip3 install build wheel python3 -m build --wheel - env: - CIBW_ARCHS: ${{ matrix.archs }} - CIBW_SKIP: "*-musllinux_*" - name: Build SDist run: pipx run build --sdist diff --git a/.github/workflows/build-protocol.yml b/.github/workflows/build-protocol.yml new file mode 100644 index 00000000..7173a82e --- /dev/null +++ b/.github/workflows/build-protocol.yml @@ -0,0 +1,61 @@ +name: Build API + +on: + push: + paths: + - livekit-protocol/** + pull_request: + paths: + - livekit-protocol/** + workflow_dispatch: + +env: + PACKAGE_DIR: ./livekit-protocol + +jobs: + build_wheels: + name: Build API wheel/sdist + runs-on: ubuntu-latest + defaults: + run: + working-directory: ${{ env.PACKAGE_DIR }} + steps: + - uses: actions/checkout@v3 + with: + submodules: true + + - uses: actions/setup-python@v4 + + - name: Build wheel + run: | + pip3 install build wheel + python3 -m build --wheel + + - name: Build SDist + run: pipx run build --sdist + + - uses: actions/upload-artifact@v3 + with: + name: protocol-release + path: | + livekit-protocol/dist/*.whl + livekit-protocol/dist/*.tar.gz + + publish: + name: Publish Protocol release + needs: build_wheels + runs-on: ubuntu-latest + permissions: + id-token: write + if: startsWith(github.ref, 'refs/tags/protocol-v') + steps: + - uses: actions/download-artifact@v3 + with: + name: protocol-release + path: dist + + - uses: pypa/gh-action-pypi-publish@release/v1 + with: + user: __token__ + password: ${{ secrets.PYPI_API_TOKEN }} +