From fd939f19b5cc4e568a161eb43724d28b5647618d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guilherme=20Castel=C3=A3o?= Date: Mon, 4 Jul 2022 19:59:41 -0300 Subject: [PATCH] Fixing auto publish (#34) * 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 --- .github/workflows/publish-to-test-pypi.yml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish-to-test-pypi.yml b/.github/workflows/publish-to-test-pypi.yml index 2c4f34b..55e36f9 100644 --- a/.github/workflows/publish-to-test-pypi.yml +++ b/.github/workflows/publish-to-test-pypi.yml @@ -1,7 +1,8 @@ name: Pyblish distributions to PyPI and TestPyPI on: - # push: + push: + branches: [ main ] workflow_dispatch: jobs: @@ -34,6 +35,9 @@ 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: @@ -41,6 +45,10 @@ jobs: # 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