From 7e009b2d3ccc8708588b8721eb3917fd9f02ab60 Mon Sep 17 00:00:00 2001 From: Rafael Leira Date: Wed, 11 Oct 2023 13:08:18 +0200 Subject: [PATCH] some fixes on github actions --- .github/workflows/publish-to-test-pypi.yml | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/.github/workflows/publish-to-test-pypi.yml b/.github/workflows/publish-to-test-pypi.yml index b7ce54c..a956ad4 100644 --- a/.github/workflows/publish-to-test-pypi.yml +++ b/.github/workflows/publish-to-test-pypi.yml @@ -3,13 +3,13 @@ on: push jobs: build-n-publish: name: Build and publish Python 🐍 distributions 📦 to PyPI and TestPyPI - runs-on: ubuntu-22.04 + runs-on: ubuntu-latest steps: - - uses: actions/checkout@master + - uses: actions/checkout@main with: fetch-depth: 0 - name: Set up Python 3.11 - uses: actions/setup-python@v1 + uses: actions/setup-python@v4 with: python-version: 3.11 - name: Install pypa/build @@ -26,14 +26,8 @@ jobs: --wheel --outdir dist/ . - - name: Publish distribution 📦 to Test PyPI - uses: pypa/gh-action-pypi-publish@master - continue-on-error: true - 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') + if: startsWith(github.ref, 'refs/tags') || github.ref == 'refs/heads/master' uses: pypa/gh-action-pypi-publish@master with: password: ${{ secrets.PYPI_API_TOKEN }}