Skip to content

Commit

Permalink
fix: only try to upload if version number changed
Browse files Browse the repository at this point in the history
This is a partial fix for #20 which will avoid trying to upload the file to PyPI when version number hasn't changed in setup.py

This means we can allow other tests to proceed and get a green tick in PRs without having to constantly bump version number.

This will uploads build artifacts so the build is still available for testing, just not from PyPI
  • Loading branch information
shawaj authored Oct 24, 2021
1 parent d7b978f commit e324173
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/publish-to-pypi-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,12 @@ jobs:
name: wheels
path: ./dist/*

- name: Get changed files
id: changed-files
uses: tj-actions/[email protected]

- name: Publish distribution 📦 to Test PyPI
if: contains(steps.changed-files.outputs.modified_files, 'setup.py')
uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
Expand Down

0 comments on commit e324173

Please sign in to comment.