From 5eb343a1fcf4498368489990a83e2584b1ee7c9c Mon Sep 17 00:00:00 2001 From: Thomas Cokelaer Date: Tue, 10 Oct 2023 14:48:52 +0200 Subject: [PATCH] update workflow --- .github/workflows/pypi.yml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/workflows/pypi.yml b/.github/workflows/pypi.yml index 020a2a6..b8e33d1 100644 --- a/.github/workflows/pypi.yml +++ b/.github/workflows/pypi.yml @@ -1,5 +1,6 @@ name: Publish to PyPI on: + workflow_dispatch: push: tags: - '*' @@ -7,15 +8,15 @@ on: jobs: build-n-publish: name: Build and publish to PyPI and TestPyPI - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 steps: - - uses: actions/checkout@master + - uses: actions/checkout@main - name: Set up Python 3.7 uses: actions/setup-python@v1 with: python-version: 3.7 - - name: Install package + - name: Install package run: | pip install build @@ -23,16 +24,16 @@ jobs: run: | rm -rf dist; python setup.py sdist - + - name: Publish distribution to Test PyPI - uses: pypa/gh-action-pypi-publish@master + uses: pypa/gh-action-pypi-publish@release/v1 with: user: __token__ 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: user: __token__ password: ${{ secrets.PYPI_API_TOKEN }}