Skip to content

Commit

Permalink
Fixing auto publish (#34)
Browse files Browse the repository at this point in the history
* Re-activating auto publish

* All manual

* Verbose

* More verbose

* Missing user

* Cleaning conditional

* Check dist files with twine

* Publish only when assign a version tag

* Only when push to main
  • Loading branch information
castelao authored Jul 4, 2022
1 parent adc331a commit fd939f1
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions .github/workflows/publish-to-test-pypi.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
name: Pyblish distributions to PyPI and TestPyPI

on:
# push:
push:
branches: [ main ]
workflow_dispatch:

jobs:
Expand Down Expand Up @@ -34,13 +35,20 @@ jobs:
--outdir dist/
.
- name: Check distribution files
run: twine check dist/*

# - name: Publish distribution package to Test PyPI
# uses: pypa/gh-action-pypi-publish@master
# with:
# password: ${{ secrets.TEST_PYPI_API_TOKEN }}
# repository_url: https://test.pypi.org/legacy/
- name: Publish distribution package to PyPI
if: startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@master
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
verify_metadata: false
verbose: true
print_hash: true

0 comments on commit fd939f1

Please sign in to comment.