-
Notifications
You must be signed in to change notification settings - Fork 7
100 lines (86 loc) · 2.39 KB
/
release.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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
name: build wheels
on:
push:
branches:
- master
release:
types:
- published
# pull_request:
# branches:
# - master
jobs:
build_wheels:
name: build ${{ matrix.py }} wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-20.04, windows-2019, macos-10.15]
py: ["cp38-*", "cp39-*", "cp310-*"]
steps:
- name: Checkout
uses: actions/checkout@v2
with:
submodules: 'recursive'
- name: Build wheels
uses: pypa/[email protected]
env:
CIBW_BUILD: ${{ matrix.py }}
CIBW_ARCHS: auto
# targets without wheels for numpy/scipy
CIBW_SKIP: "*cp310*linux_i686* *cp310-win32* *musl*"
CIBW_BEFORE_BUILD: python buildpre.py
CIBW_TEST_COMMAND: python -c "import skranger; print(skranger.__version__); from skranger import ranger"
- name: Show wheelhouse
run: |
ls wheelhouse
- name: Set up python
id: setup-python
if: github.event_name == 'release' && github.event.action == 'published'
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Publish on tag
if: github.event_name == 'release' && github.event.action == 'published'
env:
TWINE_USERNAME: crflynn
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}
run: |
pip install --upgrade twine
twine upload wheelhouse/*.whl
build_sdist:
name: build sdist
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v2
with:
submodules: 'recursive'
- name: Set up python
id: setup-python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.py }}
- name: Install poetry
uses: snok/install-poetry@v1
with:
version: 1.1.11
virtualenvs-create: true
virtualenvs-in-project: true
installer-parallel: true
- name: Create sdist
run: |
poetry run python buildpre.py
poetry build -f sdist
- name: Show dist
run: |
ls dist
- name: Publish on tag
if: github.event_name == 'release' && github.event.action == 'published'
env:
TWINE_USERNAME: crflynn
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}
run: |
pip install --upgrade twine
twine upload dist/*.tar.gz