1
1
name : Build and upload to PyPI
2
-
3
2
# Build on every workflow_dispatch, branch push, tag push, and pull request change
4
3
on :
5
4
workflow_dispatch :
27
26
CIBW_SKIP : " cp36-* pp*"
28
27
- uses : actions/upload-artifact@v4.4.3
29
28
with :
30
- name : wheels_windows64__ ${{ github.sha }}
31
- path : ./ wheelhouse/*.whl
32
-
29
+ name : ibmdb-wheels64- ${{ matrix.os }}
30
+ path : wheelhouse/*.whl
31
+
33
32
build_wheels_windows_32 :
34
33
name : Build wheels on ${{ matrix.os }} 32-bit
35
34
runs-on : ${{ matrix.os }}
45
44
CIBW_SKIP : " cp36-* pp*"
46
45
- uses : actions/upload-artifact@v4.4.3
47
46
with :
48
- name : wheels_windows32__ ${{ github.sha }}
49
- path : ./ wheelhouse/*.whl
50
-
47
+ name : ibmdb-wheels32- ${{ matrix.os }}
48
+ path : wheelhouse/*.whl
49
+
51
50
build_wheels_linux :
52
51
name : Build wheels on ${{ matrix.os }}
53
52
runs-on : ${{ matrix.os }}
64
63
CIBW_REPAIR_WHEEL_COMMAND_LINUX :
65
64
auditwheel repair
66
65
--exclude libdb2.so.1
67
- --exclude libDB2xml4c.so.58
66
+ --exclude libDB2xml4c.so.58
68
67
--exclude libm.so.6
69
68
--exclude libcrypt.so.1
70
69
--exclude libpam.so.0
76
75
{wheel}
77
76
- uses : actions/upload-artifact@v4.4.3
78
77
with :
79
- name : wheels_linux__ ${{ github.sha }}
80
- path : ./ wheelhouse/*.whl
78
+ name : ibmdb-wheels- ${{ matrix.os }}
79
+ path : wheelhouse/*.whl
81
80
82
81
build_macos_arm64_wheels :
83
82
name : Build wheels on macOS ARM64
91
90
- name : Upload wheels
92
91
uses : actions/upload-artifact@v4.4.3
93
92
with :
94
- name : wheels_macos_arm64__ ${{ github.sha }}
95
- path : ./ wheelhouse/*.whl
93
+ name : ibmdb-wheelsarm64- ${{ matrix.os }}
94
+ path : wheelhouse/*.whl
96
95
97
96
build_wheels_macos_x86 :
98
97
name : Build wheels for macOS x86_64
@@ -120,8 +119,8 @@ jobs:
120
119
- name : Upload wheels as artifacts
121
120
uses : actions/upload-artifact@v4.4.3
122
121
with :
123
- name : wheels_macosx86_python313__ ${{ github.sha }}
124
- path : ./ wheelhouse/*.whl
122
+ name : ibmdb-wheelsx86- ${{ matrix.os }}
123
+ path : wheelhouse/*.whl
125
124
126
125
build_sdist :
127
126
name : Build source distribution
@@ -138,11 +137,11 @@ jobs:
138
137
cd dist
139
138
pip install ibm_db*
140
139
echo "VERSION=$(python -c 'import ibm_db; print(ibm_db.__version__)')" >> $GITHUB_OUTPUT
141
- - name : Build source distribution
140
+ - name : Build source distribution
142
141
run : |
143
142
PACKAGE="ibm_db-$VERSION"
144
143
cd dist
145
- tar -xzf $PACKAGE.tar.gz
144
+ tar -xzf $PACKAGE.tar.gz
146
145
rm -rf $PACKAGE/clidriver*
147
146
rm -rf $PACKAGE.tar.gz
148
147
tar -czf $PACKAGE.tar.gz $PACKAGE
@@ -152,10 +151,10 @@ jobs:
152
151
- name : Upload sdist
153
152
uses : actions/upload-artifact@v4.4.3
154
153
with :
155
- path : |
156
- ./dist/*.tar.gz
154
+ name : ibmdb-sdist
155
+ path : dist/*.tar.gz
156
+
157
157
158
-
159
158
upload_pypi :
160
159
needs : [build_sdist,build_wheels_linux, build_wheels_windows_64,build_wheels_windows_32, build_macos_arm64_wheels, build_wheels_macos_x86]
161
160
runs-on : ${{ matrix.os }}
@@ -165,15 +164,16 @@ jobs:
165
164
permissions :
166
165
# IMPORTANT: this permission is mandatory for trusted publishing
167
166
id-token : write
167
+
168
168
# upload to PyPI on every tag starting with 'v'
169
169
if : github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
170
170
steps :
171
171
- uses : actions/download-artifact@v4.1.7
172
172
with :
173
- # unpacks default artifact into dist/
174
- # if `name: artifact` is omitted, the action will create extra parent dir
175
- name : artifact
176
173
path : dist
174
+ pattern : ibmdb-*
175
+ merge-multiple : true
176
+
177
177
- name : Publish distribution to PyPI
178
178
if : startsWith(github.ref, 'refs/tags')
179
- uses : pypa/gh-action-pypi-publish@release/v1
179
+ uses : pypa/gh-action-pypi-publish@release/v1.12
0 commit comments