From 768973dfdec5f67d6fc5427b58611adafcd0951c Mon Sep 17 00:00:00 2001 From: "Mark S. Bentley" Date: Wed, 10 Jan 2024 16:54:19 +0100 Subject: [PATCH] Update publish-to-test-pypi.yml --- .github/workflows/publish-to-test-pypi.yml | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/.github/workflows/publish-to-test-pypi.yml b/.github/workflows/publish-to-test-pypi.yml index 641282a..beadcf2 100644 --- a/.github/workflows/publish-to-test-pypi.yml +++ b/.github/workflows/publish-to-test-pypi.yml @@ -1,18 +1,18 @@ -name: Publish to PyPi and TestPyPi +name: Publish tagged versions to PyPi on: push jobs: build-n-publish: - name: Build and publish to PyPI and TestPyPI + name: Publish tagged versions to PyPi runs-on: ubuntu-latest steps: - uses: actions/checkout@master - - name: Set up Python 3.7 - uses: actions/setup-python@v1 + - name: Set up Python + uses: actions/setup-python@v4 with: - python-version: 3.7 + python-version: 3.x - name: Install pypa/build run: >- @@ -30,15 +30,8 @@ jobs: --outdir dist/ . - - name: Publish distribution to Test PyPI - if: "!startsWith(github.ref, 'refs/tags')" - uses: pypa/gh-action-pypi-publish@master - with: - password: ${{ secrets.TEST_PYPI_API_TOKEN }} - repository_url: https://test.pypi.org/legacy/ - - name: Publish distribution to PyPI if: startsWith(github.ref, 'refs/tags') - uses: pypa/gh-action-pypi-publish@master + uses: pypa/gh-action-pypi-publish@release/v1 with: password: ${{ secrets.PYPI_API_TOKEN }}