81 lines (70 loc) · 2.46 KB
/
deploy-wheels-linux.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
name: Deploy Linux wheels
on:
push:
branches:
- main
release:
types:
- published
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
wheel: [
"manylinux2014_aarch64",
"manylinux2014_i686",
"manylinux2014_x86_64",
"musllinux_1_1_x86_64",
]
python-version: ["pypy3", "3.6", "3.7", "3.8", "3.9", "3.10-dev"]
include:
# Add version-tag variable to existing jobs
- { python-version: "pypy3", version-tag: "pp37-pypy37_pp73" }
- { python-version: "3.6", version-tag: "cp36-cp36m" }
- { python-version: "3.7", version-tag: "cp37-cp37m" }
- { python-version: "3.8", version-tag: "cp38-cp38" }
- { python-version: "3.9", version-tag: "cp39-cp39" }
- { python-version: "3.10-dev", version-tag: "cp310-cp310" }
exclude:
# No PyPy3 on musllinux
- { python-version: "pypy3", wheel: "musllinux_1_1_x86_64" }
steps:
- uses: actions/checkout@v2
- run: |
git fetch --prune --unshallow
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade -q pip pytest wheel setuptools twine
# https://github.com/docker/setup-qemu-action
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
# https://github.com/docker/setup-buildx-action
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Build ${{ matrix.wheel }} wheels
run: |
docker run -v `pwd`:/io quay.io/pypa/${{ matrix.wheel }} /io/scripts/build-manylinux-wheels.sh ${{ matrix.version-tag }}
- name: Upload as build artifacts
uses: actions/upload-artifact@v2
with:
name: wheels
path: dist/*.whl
- name: Publish package to PyPI
if: github.event.action == 'published'
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.pypi_password }}
run: twine upload --skip-existing dist/*.whl
- name: Publish package to TestPyPI
if: github.repository == 'ultrajson/ultrajson'
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.test_pypi_password }}
run: |
twine upload --repository-url https://test.pypi.org/legacy/ --skip-existing dist/*.whl