-
Notifications
You must be signed in to change notification settings - Fork 0
63 lines (51 loc) · 1.42 KB
/
Copy pathpublish.yml
File metadata and controls
63 lines (51 loc) · 1.42 KB
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
name: Build and publish to PyPI
on:
push:
tags:
- "v*"
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install build deps
run: pip install build cython auditwheel patchelf
- name: Copy engine source
env:
ENGINE_SOURCE: ${{ secrets.ENGINE_SOURCE }}
run: echo "$ENGINE_SOURCE" > archview/_engine.py
- name: Build wheel
run: python -m build --wheel
- name: Fix wheel platform tag
run: |
auditwheel repair dist/*.whl --plat manylinux_2_35_x86_64 -w dist-fixed/
rm -rf dist
mv dist-fixed dist
- uses: actions/upload-artifact@v4
with:
name: wheel-${{ matrix.python-version }}
path: dist/*.whl
publish:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v4
with:
path: dist
merge-multiple: true
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Publish to PyPI
run: |
pip install twine
twine upload dist/*.whl
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}