Skip to content

Commit

Permalink
infra: adding step to publish action (#733)
Browse files Browse the repository at this point in the history
Adding a step to test that uploading packages to pypi should work.

This should prevent issues that occurred in the release of 0.7.0 from happening where a classifier was set incorrectly (3 - Beta), causing pypi to return a 400 and fail publishing packages.
  • Loading branch information
alrex authored May 26, 2020
1 parent b51a518 commit 027f61f
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,24 @@ jobs:
python-version: '3.7'
- name: Build wheels
run: ./scripts/build.sh
- name: Install twine
run: |
pip install twine
# The step below publishes to testpypi in order to catch any issues
# with the package configuration that would cause a failure to upload
# to pypi. One example of such a failure is if a classifier is
# rejected by pypi (e.g "3 - Beta"). This would cause a failure during the
# middle of the package upload causing the action to fail, and certain packages
# might have already been updated, this would be bad.
- name: Publish to TestPyPI
env:
TWINE_USERNAME: ${{ secrets.test_pypi_username }}
TWINE_PASSWORD: ${{ secrets.test_pypi_password }}
run: |
twine upload --repository testpypi --skip-existing --verbose dist/*
- name: Publish to PyPI
env:
TWINE_USERNAME: '__token__'
TWINE_PASSWORD: ${{ secrets.pypi_password }}
run: |
pip install twine
twine upload --skip-existing --verbose dist/*

0 comments on commit 027f61f

Please sign in to comment.