Skip to content

Commit 14a4568

Browse files
committed
ci: update release flow
drop build-from-sdist, does not work on cibuildwheel/windows
1 parent 58ceced commit 14a4568

File tree

1 file changed

+22
-40
lines changed

1 file changed

+22
-40
lines changed

.github/workflows/release.yml

Lines changed: 22 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -12,64 +12,45 @@ on:
1212
jobs:
1313
sdist:
1414
name: "Build source package"
15-
runs-on: ubuntu-20.04
15+
runs-on: ubuntu-latest
1616
steps:
17-
- uses: actions/checkout@v2
17+
- uses: actions/checkout@v3
1818
- uses: actions/setup-python@v2
19-
with: {python-version: "3.8"}
19+
with: {python-version: "3.9"}
2020
- run: python setup.py sdist
2121
- uses: actions/upload-artifact@v2
2222
with: {name: "dist", path: "dist"}
2323

24-
linux_wheels:
25-
name: "Wheel: manylinux2014"
26-
needs: [sdist]
27-
runs-on: ubuntu-20.04
28-
steps:
29-
- uses: actions/checkout@v2
30-
- uses: actions/download-artifact@v2
31-
with: {name: "dist", path: "sdist"}
32-
- uses: "docker://quay.io/pypa/manylinux2014_x86_64:latest"
33-
with: {entrypoint: "./.github/workflows/manylinux.sh"}
34-
- uses: "docker://quay.io/pypa/manylinux2014_i686:latest"
35-
with: {entrypoint: "./.github/workflows/manylinux.sh"}
36-
- uses: actions/upload-artifact@v2
37-
with: {name: "dist", path: "dist"}
38-
39-
other_wheels:
40-
name: "Wheel: ${{matrix.sys.name}}-${{matrix.sys.pyarch}}-${{matrix.pyver}}"
41-
needs: [sdist]
24+
cibuildwheel:
25+
name: "Wheels: ${{matrix.sys.name}}"
4226
runs-on: ${{matrix.sys.os}}
4327
strategy:
4428
matrix:
4529
sys:
46-
- {os: "macos-10.15", name: "MacOS 10.15", pyarch: "x64"}
47-
- {os: "windows-2019", name: "Windows 2019", pyarch: "x86"}
48-
- {os: "windows-2019", name: "Windows 2019", pyarch: "x64"}
49-
pyver: ["3.6"]
30+
- {os: "ubuntu-latest", name: "Linux", arches: "auto"}
31+
- {os: "macos-latest", name: "MacOS", arches: "x86_64 arm64 universal2"}
32+
- {os: "windows-latest", name: "Windows", arches: "auto"}
5033
steps:
51-
- uses: actions/checkout@v2
52-
- uses: actions/setup-python@v2
53-
with: {architecture: "${{matrix.sys.pyarch}}", python-version: "${{matrix.pyver}}"}
54-
- uses: actions/download-artifact@v2
55-
with: {name: "dist", path: "sdist"}
56-
- name: "Build"
34+
- uses: actions/checkout@v3
35+
- uses: pypa/cibuildwheel@v2.8.0
36+
env:
37+
CIBW_ARCHS: ${{matrix.sys.arches}}
38+
- name: "Check"
5739
shell: bash
5840
run: |
59-
pip install --disable-pip-version-check -U wheel
60-
pip wheel --disable-pip-version-check --build-option --py-limited-api=cp36 -w dist sdist/*.tar.gz
61-
ls -l dist
62-
- uses: actions/upload-artifact@v2
63-
with: {name: "dist", path: "dist"}
41+
ls -l
42+
ls -l wheelhouse
43+
- uses: actions/upload-artifact@v3
44+
with: {name: "dist", path: "wheelhouse"}
6445

6546
publish:
6647
name: "Publish"
67-
runs-on: ubuntu-20.04
68-
needs: [linux_wheels, other_wheels]
48+
runs-on: ubuntu-latest
49+
needs: [sdist, cibuildwheel]
6950
steps:
70-
- uses: actions/checkout@v2
51+
- uses: actions/checkout@v3
7152
- uses: actions/setup-python@v2
72-
with: {python-version: "3.8"}
53+
with: {python-version: "3.9"}
7354
- uses: actions/download-artifact@v2
7455
with: {name: "dist", path: "dist"}
7556
- name: "Prepare"
@@ -96,6 +77,7 @@ jobs:
9677
mkdir -p tmp
9778
make -s shownote > tmp/note.md
9879
cat tmp/note.md
80+
ls -l dist
9981
10082
- name: "Create release"
10183
id: github_release

0 commit comments

Comments
 (0)