1
1
name : CD
2
2
3
3
on :
4
+ pull_request :
4
5
push :
5
6
branches :
6
7
- main
@@ -21,26 +22,30 @@ jobs:
21
22
python-version : ' 3.11'
22
23
- name : Install dependencies
23
24
run : |
24
- python -m pip install --upgrade pip
25
- python -m pip install build twine auditwheel validate-pyproject[all]
26
- - name : Check and install package
25
+ python -m pip install --upgrade pip build validate-pyproject[all]
26
+ python -m build --sdist
27
+ - name : Upload sdist
28
+ uses : actions/upload-artifact@v4
29
+ with :
30
+ name : sdist
31
+ path : dist
32
+ - name : Build wheels
27
33
run : |
28
34
validate-pyproject pyproject.toml
29
- python -m build
30
- python -m auditwheel repair dist/*.whl
31
- python -m twine check --strict dist/*
32
- python -m pip install dist/*.whl
35
+ docker run --rm -v `pwd`:/project -w /project quay.io/pypa/manylinux2014_x86_64 bash .github/workflows/docker/buildwheel.sh
33
36
- name : Check vcztools CLI
34
37
run : |
38
+ pip install numpy "zarr>=2.17,<3" click pyranges pyparsing
39
+ pip install vcztools --no-index --only-binary vcztools -f dist/wheelhouse
35
40
vcztools --help
36
41
# Make sure we don't have ``vcztools`` in the CWD
37
42
cd tests
38
43
python -m vcztools --help
39
44
- name : Store the distribution packages
40
45
uses : actions/upload-artifact@v4
41
46
with :
42
- name : python-package-distributions
43
- path : dist/
47
+ name : linux-wheels
48
+ path : dist/wheelhouse
44
49
45
50
publish-to-pypi :
46
51
if : github.repository_owner == 'sgkit-dev' && github.event_name == 'release'
@@ -55,11 +60,14 @@ jobs:
55
60
id-token : write # IMPORTANT: mandatory for trusted publishing
56
61
57
62
steps :
58
- - uses : actions/download-artifact@v4
59
- with :
60
- name : python-package-distributions
61
- path : dist/
62
- - uses : pypa/gh-action-pypi-publish@release/v1
63
+ - name : Download all
64
+ uses : actions/download-artifact@v4.1.8
65
+ - name : Move to dist
66
+ run : |
67
+ mkdir dist
68
+ cp */*.{whl,gz} dist/.
69
+ ls dist
70
+ - uses : pypa/gh-action-pypi-publish@release/v1
63
71
64
72
65
73
publish-to-testpypi :
@@ -76,11 +84,14 @@ jobs:
76
84
id-token : write # IMPORTANT: mandatory for trusted publishing
77
85
78
86
steps :
79
- - uses : actions/download-artifact@v4
80
- with :
81
- name : python-package-distributions
82
- path : dist/
83
- - uses : pypa/gh-action-pypi-publish@release/v1
84
- with :
85
- verbose : true
86
- repository-url : https://test.pypi.org/legacy/
87
+ - name : Download all
88
+ uses : actions/download-artifact@v4.1.8
89
+ - name : Move to dist
90
+ run : |
91
+ mkdir dist
92
+ cp */*.{whl,gz} dist/.
93
+ ls dist
94
+ - uses : pypa/gh-action-pypi-publish@release/v1
95
+ with :
96
+ verbose : true
97
+ repository-url : https://test.pypi.org/legacy/
0 commit comments