Skip to content

Commit 058626d

Browse files
author
Mikhail Koviazin
committed
github: rework publish workflow
remove wheelbuild-labeled as it wasn't used anyways. Also remove additional inclusions and rewrite PyPI-publish so that it is a plain simple workflow Signed-off-by: Mikhail Koviazin <[email protected]>
1 parent 9e721a0 commit 058626d

File tree

3 files changed

+81
-132
lines changed

3 files changed

+81
-132
lines changed

.github/workflows/REUSABLE-wheeler.yaml

Lines changed: 0 additions & 108 deletions
This file was deleted.

.github/workflows/pypi-publish.yaml

Lines changed: 81 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,88 @@ on:
66
permissions:
77
contents: read # to fetch code (actions/checkout)
88

9-
109
jobs:
1110

12-
release:
13-
uses: ./.github/workflows/REUSABLE-wheeler.yaml
14-
with:
15-
release: true
11+
build_sdist:
12+
name: Build source dist
13+
runs-on: ubuntu-20.04
14+
steps:
15+
- uses: actions/setup-python@v4
16+
with:
17+
python-version: '3.10'
18+
- uses: actions/checkout@v3
19+
with:
20+
submodules: recursive
21+
- name: Build sdist
22+
run: |
23+
python3 setup.py sdist
24+
- uses: actions/upload-artifact@v3
25+
with:
26+
name: source-dist
27+
path: ./dist/*.tar.gz
28+
29+
build_wheels:
30+
name: Build wheels on ${{ matrix.os }}
31+
runs-on: ${{ matrix.os }}
32+
strategy:
33+
matrix:
34+
os: [ubuntu-20.04, windows-2019, macos-latest]
35+
env:
36+
CIBW_ARCHS_MACOS: "x86_64 universal2 arm64"
37+
MACOSX_DEPLOYMENT_TARGET: "10.15"
38+
steps:
39+
- uses: actions/checkout@v4
40+
with:
41+
submodules: recursive
42+
43+
- name: Set up QEMU
44+
if: runner.os == 'Linux'
45+
uses: docker/setup-qemu-action@v3
46+
with:
47+
platforms: all
48+
49+
- name: Build wheels
50+
uses: pypa/[email protected]
51+
env:
52+
# configure cibuildwheel to build native archs ('auto'), and some
53+
# emulated ones
54+
CIBW_ARCHS_LINUX: auto aarch64 ppc64le s390x
55+
56+
- uses: actions/upload-artifact@v3
57+
with:
58+
name: ${{matrix.os}}-wheels
59+
path: ./wheelhouse/*.whl
60+
61+
publish:
62+
name: Pypi publish
63+
needs: ['build_sdist', 'build_wheels']
64+
runs-on: ubuntu-latest
65+
environment: pypi
1666
permissions:
1767
id-token: write
18-
secrets: inherit
68+
steps:
69+
- uses: actions/download-artifact@v3
70+
with:
71+
name: ubuntu-20.04-wheels
72+
path: artifacts/linux
73+
- uses: actions/download-artifact@v3
74+
with:
75+
name: windows-2019-wheels
76+
path: artifacts/windows
77+
- uses: actions/download-artifact@v3
78+
with:
79+
name: macos-latest-wheels
80+
path: artifacts/macos
81+
- uses: actions/download-artifact@v3
82+
with:
83+
name: source-dist
84+
path: artifacts/sdist
85+
- name: unify wheel structure
86+
run: |
87+
mkdir dist
88+
cp -R artifacts/windows/* dist
89+
cp -R artifacts/linux/* dist
90+
cp -R artifacts/macos/* dist
91+
cp -R artifacts/sdist/* dist
92+
- name: Publish to Pypi
93+
uses: pypa/gh-action-pypi-publish@release/v1

.github/workflows/wheelbuild-labeled.yaml

Lines changed: 0 additions & 18 deletions
This file was deleted.

0 commit comments

Comments
 (0)