From c7c0e8344a34e1ca5db7e9996c391a3a43c81a55 Mon Sep 17 00:00:00 2001 From: Maximilian Linhoff Date: Tue, 16 Jul 2024 14:09:04 +0200 Subject: [PATCH] Fix download of artifacts --- .github/workflows/deploy.yml | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 38d73f2..cf6ea64 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -39,7 +39,7 @@ jobs: - uses: actions/upload-artifact@v4 with: path: ./dist/*.whl - name: wheels-${{ matrix.os }} + name: dist-wheels-${{ matrix.os }}-${{ strategy.job-index }} build_sdist: runs-on: ubuntu-latest @@ -63,10 +63,10 @@ jobs: - uses: actions/upload-artifact@v4 with: path: ./dist/*.tar.gz - name: sdist + name: dist-sdist pypi_upload: - if: startsWith(github.ref, 'refs/tags/v') + if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') runs-on: ubuntu-latest needs: - build_wheels @@ -74,12 +74,15 @@ jobs: steps: - name: Download artifacts uses: actions/download-artifact@v4 + with: + # unpacks all dist artifacts into dist/ + pattern: dist-* + path: dist + merge-multiple: true - - name: preparing upload - run: | - ls -l wheels sdist - mkdir dist - cp wheels/* sdist/* dist/ + + - name: Check files + run: ls -l dist - name: Publish package uses: pypa/gh-action-pypi-publish@release/v1