Skip to content

Commit

Permalink
Upload CI artifacts on "push" triggers only (#85)
Browse files Browse the repository at this point in the history
Uploaded CI artifacts are currently used for publishing to PyPI (or
TestPyPI). The `publish-to-pypi` and `publish-to-testpypi` jobs are only
triggered by "push" events -- otherwise the uploaded CI artifacts go
unused.

In order to avoid wasting resources, let's upload CI artifacts only on
"push" events.
  • Loading branch information
gmgunter authored Sep 16, 2024
1 parent e99bd75 commit a5da2f7
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,8 @@ jobs:
- run: |
pip install check-wheel-contents
check-wheel-contents ./wheelhouse/*.whl
- uses: actions/upload-artifact@v4
- if: github.event_name == 'push'
uses: actions/upload-artifact@v4
with:
name: ${{ env.artifact_prefix }}-wheels-${{ matrix.runner }}-${{ matrix.arch }}
path: ./wheelhouse/*.whl
Expand All @@ -107,7 +108,8 @@ jobs:
with: { fetch-depth: 0, submodules: true }
- run: pipx run build --sdist
- run: pipx run twine check --strict dist/*
- uses: actions/upload-artifact@v4
- if: github.event_name == 'push'
uses: actions/upload-artifact@v4
with:
name: ${{ env.artifact_prefix }}-sdist
path: dist/*.tar.gz
Expand Down

0 comments on commit a5da2f7

Please sign in to comment.