-
Notifications
You must be signed in to change notification settings - Fork 29
70 lines (68 loc) · 1.9 KB
/
default.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
name: main
on: [push]
jobs:
sdist:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.x"
- name: install pip dependencies
run: |
python -m pip install --upgrade pip build
- name: sdist
run: python -m build --sdist
- name: upload sdist
uses: actions/upload-artifact@v4
with:
name: sdist
path: dist
retention-days: 5
build_wheels:
strategy
matrix:
os: [ubuntu-latest, macos-13, macos-14, windows-latest]
runs-on: ${{ matrix.os }}
env:
CIBW_SKIP: "*p36-* *p37-*"
CIBW_ARCHS: auto64
steps:
- uses: actions/checkout@v4
- name: cache native build artifacts
uses: actions/cache@v4
with:
path: build
key: taglib-${{ matrix.os }}-${{ hashFiles('build_taglib.py') }}
- name: build binary wheels
uses: pypa/[email protected]
- name: upload wheels
uses: actions/upload-artifact@v4
with:
name: bdist-${{ matrix.os }}
path: ./wheelhouse/*.whl
retention-days: 5
publish:
runs-on: ubuntu-latest
needs: [build_wheels, sdist]
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
steps:
- name: download source wheel
uses: actions/download-artifact@v4
with:
name: sdist
path: wheels
- name: download binary wheels
uses: actions/download-artifact@v3
with:
pattern: bdist-*
path: wheels
merge-multiple: true
- name: publish package pypi.org
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
skip-existing: true
packages-dir: wheels