From af6eed2714573d90e9e63ebbf7580eeb8d75490c Mon Sep 17 00:00:00 2001 From: Andras Schmelczer Date: Sat, 25 Jun 2022 18:31:35 +0200 Subject: [PATCH] Add publish action --- .github/workflows/publish.yaml | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index 4fe032a..cba7968 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -2,22 +2,25 @@ name: Publish package on: workflow_run: - workflows: Run tests + workflows: Check library branches: main types: completed jobs: build: - if: ${{ github.event.workflow_run.conclusion == 'success' }} + if: | + github.event.workflow_run.conclusion == 'success' + && github.event_name == 'push' + && startsWith(github.ref, 'refs/tags') runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - name: Set up Python 3.9 + - name: Set up Python 3.9.2 uses: actions/setup-python@v2 with: - python-version: 3.9 + python-version: 3.9.2 - name: Install pypa/build run: python -m pip install build --user @@ -28,4 +31,5 @@ jobs: - name: Publish distribution to PyPI uses: pypa/gh-action-pypi-publish@master with: - password: ${{ secrets.PYPI_API_TOKEN }} \ No newline at end of file + user: __token__ + password: ${{ secrets.PYPI_API_TOKEN }}