Skip to content

Commit 7de63ea

Browse files
authored
Enhance PyPI publishing step: gather distributions into a flat directory and clean up artifacts (#127)
1 parent a9f1779 commit 7de63ea

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

.github/workflows/cd.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,16 +46,25 @@ jobs:
4646
path: dist/
4747

4848
publish:
49-
# publish only once (not in matrix)
5049
name: Publish package to PyPI
5150
needs: pypi
5251
runs-on: ubuntu-latest
5352
permissions:
5453
id-token: write
54+
5555
steps:
5656
- uses: actions/download-artifact@v4
5757
with:
5858
path: dist/
59+
60+
- name: Gather distributions
61+
run: |
62+
mkdir -p dist_flat
63+
find dist -type f \( -name '*.whl' -o -name '*.tar.gz' \) -exec mv {} dist_flat/ \;
64+
rm -rf dist
65+
mv dist_flat dist
66+
ls -l dist
67+
5968
- uses: pypa/gh-action-pypi-publish@release/v1
6069
with:
6170
skip-existing: true

0 commit comments

Comments
 (0)