-
Notifications
You must be signed in to change notification settings - Fork 2
52 lines (52 loc) · 1.32 KB
/
Deploy.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
name: Deploy
on:
push:
branches: main
release:
types: published
jobs:
wheels:
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
python-version:
# - '3.10'
# - '3.11'
- '3.12'
runs-on: ${{ matrix.os }}
steps:
- name: checkout
uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: install build deps
run: |
python -m pip install --upgrade pip
pip install build setuptools twine wheel
- name: Build package
run: python -m build
- uses: actions/upload-artifact@v4
with:
name: ${{ matrix.os }}-${{ matrix.python-version }}-wheel
path: dist/
twine:
needs: wheels
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v4
- uses: actions/setup-python@v5
with:
check-latest: true
python-version: 3.13
- name: wheelhouse
run: mkdir -p wheelhouse/ && mv ./*-wheel*/*.whl wheelhouse/
- name: twine
run: pip install twine
- name: check
run: twine check wheelhouse/*.whl
- name: upload
if: github.event_name == 'release'
run: twine upload -u __token__ -p ${{ secrets.PYPI_API_TOKEN }} wheelhouse/*.whl