Debian Codegraph @

testing/web-platform/tests/tools/third_party/websockets/.github/workflows/wheels.yml

raw
1 name: Build wheels
2
3 on:
4 push:
5 tags:
6 - '*'
7 workflow_dispatch:
8
9 jobs:
10 sdist:
11 name: Build source distribution and architecture-independent wheel
12 runs-on: ubuntu-latest
13 steps:
14 - name: Check out repository
15 uses: actions/checkout@v4
16 - name: Install Python 3.x
17 uses: actions/setup-python@v4
18 with:
19 python-version: 3.x
20 - name: Build sdist
21 run: python setup.py sdist
22 - name: Save sdist
23 uses: actions/upload-artifact@v3
24 with:
25 path: dist/*.tar.gz
26 - name: Install wheel
27 run: pip install wheel
28 - name: Build wheel
29 env:
30 BUILD_EXTENSION: no
31 run: python setup.py bdist_wheel
32 - name: Save wheel
33 uses: actions/upload-artifact@v3
34 with:
35 path: dist/*.whl
36
37 wheels:
38 name: Build architecture-specific wheels on ${{ matrix.os }}
39 runs-on: ${{ matrix.os }}
40 strategy:
41 matrix:
42 os:
43 - ubuntu-latest
44 - windows-latest
45 - macOS-latest
46 steps:
47 - name: Check out repository
48 uses: actions/checkout@v4
49 - name: Install Python 3.x
50 uses: actions/setup-python@v4
51 with:
52 python-version: 3.x
53 - name: Set up QEMU
54 if: runner.os == 'Linux'
55 uses: docker/setup-qemu-action@v3
56 with:
57 platforms: all
58 - name: Build wheels
59 uses: pypa/[email protected]
60 env:
61 BUILD_EXTENSION: yes
62 - name: Save wheels
63 uses: actions/upload-artifact@v3
64 with:
65 path: wheelhouse/*.whl
66
67 release:
68 name: Release
69 needs:
70 - sdist
71 - wheels
72 runs-on: ubuntu-latest
73 # Don't release when running the workflow manually from GitHub's UI.
74 if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
75 steps:
76 - name: Download artifacts
77 uses: actions/download-artifact@v3
78 with:
79 name: artifact
80 path: dist
81 - name: Upload to PyPI
82 uses: pypa/gh-action-pypi-publish@release/v1
83 with:
84 password: ${{ secrets.PYPI_API_TOKEN }}
85 - name: Create GitHub release
86 env:
87 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
88 run: gh release create ${{ github.ref_name }} --notes "See https://websockets.readthedocs.io/en/stable/project/changelog.html for details."