-
Notifications
You must be signed in to change notification settings - Fork 50
63 lines (58 loc) · 1.57 KB
/
main.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
name: tests
on:
pull_request:
push:
tags:
- "**"
workflow_dispatch:
jobs:
build_wheels:
name: "Build ${{ matrix.CIBW_BUILD }} wheels on ${{ matrix.os }}"
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
CIBW_BUILD: ["*"]
exclude:
- os: ubuntu-latest
CIBW_BUILD: "*"
include:
- os: ubuntu-latest
CIBW_BUILD: "*manylinux*"
# Disable musllinux
# - os: ubuntu-latest
# CIBW_BUILD: "*musllinux*"
continue-on-error: true
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Build ${{ matrix.CIBW_BUILD }} wheels on ${{ matrix.os }}
uses: pypa/[email protected]
env:
CIBW_BUILD: ${{ matrix.CIBW_BUILD }}
- uses: actions/upload-artifact@v3
if: always()
with:
name: distribution
path: ./wheelhouse/*.whl
release:
needs: [build_wheels]
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/download-artifact@v3
with:
name: distribution
path: dist/
- name: Setup Python
uses: actions/setup-python@v4
- name: Install tox
run: |
python -m pip install tox
- name: Release
run: tox -e release
env:
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}