Skip to content

Commit

Permalink
Move artifact uploading to the end
Browse files Browse the repository at this point in the history
  • Loading branch information
rhpvorderman committed Nov 29, 2024
1 parent 4f51908 commit 7a22eab
Showing 1 changed file with 6 additions and 12 deletions.
18 changes: 6 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -143,27 +143,21 @@ jobs:
run: |
pip install build
python -m build --sdist
- uses: actions/upload-artifact@v4
with:
name: "dist-${{ runner.os }}-${{ runner.arch }}-${{ matrix.cibw_archs_linux }}"
path: "dist/"
- uses: actions/setup-python@v4
name: Install Python
- name: Publish package to TestPyPI
# pypa/gh-action-pypi-publish@master does not work on OSX
# Alpha, Beta and dev releases contain a - in the tag.
if: contains(github.ref, '-') && startsWith(github.ref, 'refs/tags')
run: |
pip install twine
python -m twine upload --skip-existing --repository-url https://test.pypi.org/legacy/ dist/*
run: python -m twine upload --skip-existing --repository-url https://test.pypi.org/legacy/ dist/*
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.TEST_PYPI_API_TOKEN }}
- name: Publish package to PyPI
if: "!contains(github.ref, '-') && startsWith(github.ref, 'refs/tags')"
run: |
pip install twine
python -m twine upload --skip-existing dist/*
run: python -m twine upload --skip-existing dist/*
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
- uses: actions/upload-artifact@v4
with:
name: "dist-${{ runner.os }}-${{ runner.arch }}-${{ matrix.cibw_archs_linux }}"
path: "dist/"

0 comments on commit 7a22eab

Please sign in to comment.