11name : Build and upload to PyPI
2-
32# Build on every workflow_dispatch, branch push, tag push, and pull request change
43on :
54 workflow_dispatch :
2726 CIBW_SKIP : " cp36-* pp*"
2827 - uses : actions/upload-artifact@v4.4.3
2928 with :
30- name : wheels_windows64__ ${{ github.sha }}
31- path : ./ wheelhouse/*.whl
32-
29+ name : ibmdb-wheels64- ${{ matrix.os }}
30+ path : wheelhouse/*.whl
31+
3332 build_wheels_windows_32 :
3433 name : Build wheels on ${{ matrix.os }} 32-bit
3534 runs-on : ${{ matrix.os }}
4544 CIBW_SKIP : " cp36-* pp*"
4645 - uses : actions/upload-artifact@v4.4.3
4746 with :
48- name : wheels_windows32__ ${{ github.sha }}
49- path : ./ wheelhouse/*.whl
50-
47+ name : ibmdb-wheels32- ${{ matrix.os }}
48+ path : wheelhouse/*.whl
49+
5150 build_wheels_linux :
5251 name : Build wheels on ${{ matrix.os }}
5352 runs-on : ${{ matrix.os }}
6463 CIBW_REPAIR_WHEEL_COMMAND_LINUX :
6564 auditwheel repair
6665 --exclude libdb2.so.1
67- --exclude libDB2xml4c.so.58
66+ --exclude libDB2xml4c.so.58
6867 --exclude libm.so.6
6968 --exclude libcrypt.so.1
7069 --exclude libpam.so.0
7675 {wheel}
7776 - uses : actions/upload-artifact@v4.4.3
7877 with :
79- name : wheels_linux__ ${{ github.sha }}
80- path : ./ wheelhouse/*.whl
78+ name : ibmdb-wheels- ${{ matrix.os }}
79+ path : wheelhouse/*.whl
8180
8281 build_macos_arm64_wheels :
8382 name : Build wheels on macOS ARM64
9190 - name : Upload wheels
9291 uses : actions/upload-artifact@v4.4.3
9392 with :
94- name : wheels_macos_arm64__ ${{ github.sha }}
95- path : ./ wheelhouse/*.whl
93+ name : ibmdb-wheelsarm64- ${{ matrix.os }}
94+ path : wheelhouse/*.whl
9695
9796 build_wheels_macos_x86 :
9897 name : Build wheels for macOS x86_64
@@ -120,8 +119,8 @@ jobs:
120119 - name : Upload wheels as artifacts
121120 uses : actions/upload-artifact@v4.4.3
122121 with :
123- name : wheels_macosx86_python313__ ${{ github.sha }}
124- path : ./ wheelhouse/*.whl
122+ name : ibmdb-wheelsx86- ${{ matrix.os }}
123+ path : wheelhouse/*.whl
125124
126125 build_sdist :
127126 name : Build source distribution
@@ -138,11 +137,11 @@ jobs:
138137 cd dist
139138 pip install ibm_db*
140139 echo "VERSION=$(python -c 'import ibm_db; print(ibm_db.__version__)')" >> $GITHUB_OUTPUT
141- - name : Build source distribution
140+ - name : Build source distribution
142141 run : |
143142 PACKAGE="ibm_db-$VERSION"
144143 cd dist
145- tar -xzf $PACKAGE.tar.gz
144+ tar -xzf $PACKAGE.tar.gz
146145 rm -rf $PACKAGE/clidriver*
147146 rm -rf $PACKAGE.tar.gz
148147 tar -czf $PACKAGE.tar.gz $PACKAGE
@@ -152,10 +151,10 @@ jobs:
152151 - name : Upload sdist
153152 uses : actions/upload-artifact@v4.4.3
154153 with :
155- path : |
156- ./dist/*.tar.gz
154+ name : ibmdb-sdist
155+ path : dist/*.tar.gz
156+
157157
158-
159158 upload_pypi :
160159 needs : [build_sdist,build_wheels_linux, build_wheels_windows_64,build_wheels_windows_32, build_macos_arm64_wheels, build_wheels_macos_x86]
161160 runs-on : ${{ matrix.os }}
@@ -165,15 +164,16 @@ jobs:
165164 permissions :
166165 # IMPORTANT: this permission is mandatory for trusted publishing
167166 id-token : write
167+
168168 # upload to PyPI on every tag starting with 'v'
169169 if : github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
170170 steps :
171171 - uses : actions/download-artifact@v4.1.7
172172 with :
173- # unpacks default artifact into dist/
174- # if `name: artifact` is omitted, the action will create extra parent dir
175- name : artifact
176173 path : dist
174+ pattern : ibmdb-*
175+ merge-multiple : true
176+
177177 - name : Publish distribution to PyPI
178178 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