Skip to content

Commit

Permalink
uuuu
Browse files Browse the repository at this point in the history
  • Loading branch information
dirvine committed Nov 30, 2024
1 parent 5ff7b78 commit ae88a2c
Showing 1 changed file with 21 additions and 39 deletions.
60 changes: 21 additions & 39 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -329,55 +329,37 @@ jobs:
steps:
- name: Create dist directory
run: mkdir -p dist

# Download artifacts for each platform and Python version
- name: Download Linux artifacts
uses: actions/download-artifact@v3
with:
pattern: wheels-linux-*
path: dist
merge-multiple: true

- name: Download MacOS artifacts
uses: actions/download-artifact@v3
with:
pattern: wheels-macos-*
path: dist
merge-multiple: true

- name: Download Windows artifacts
uses: actions/download-artifact@v3
with:
pattern: wheels-windows-*
path: dist
merge-multiple: true

- name: Download sdist

# Download all artifacts at once
- name: Download all artifacts
uses: actions/download-artifact@v3
with:
pattern: wheels-sdist-*
path: dist
merge-multiple: true

- name: Debug dist contents
path: artifacts

- name: Prepare artifacts for publishing
run: |
echo "Contents of dist directory:"
ls -la dist/
echo "Available artifacts:"
ls -R artifacts/
echo "\nAll wheel files:"
find dist -name "*.whl" || echo "No wheel files found"
echo "\nMoving all wheels and source distributions to dist/"
# Move all wheel files to dist/
find artifacts -type f -name "*.whl" -exec cp -v {} dist/ \;
# Move all source distributions to dist/
find artifacts -type f -name "*.tar.gz" -exec cp -v {} dist/ \;
echo "\nAll source distributions:"
find dist -name "*.tar.gz" || echo "No source distributions found"
echo "\nContents of dist directory:"
ls -la dist/
file_count=$(find dist -type f \( -name "*.whl" -o -name "*.tar.gz" \) | wc -l)
echo "\nFound $file_count distribution files"
# Count distribution files
wheel_count=$(find dist -name "*.whl" | wc -l)
sdist_count=$(find dist -name "*.tar.gz" | wc -l)
echo "\nFound $wheel_count wheel files and $sdist_count source distributions"
if [ $file_count -eq 0 ]; then
if [ $wheel_count -eq 0 ] && [ $sdist_count -eq 0 ]; then
echo "Error: No distribution files found!"
exit 1
fi
- name: Publish to PyPI
if: success()
uses: pypa/gh-action-pypi-publish@release/v1
Expand Down

0 comments on commit ae88a2c

Please sign in to comment.