From 81319a28dc7b91801e3bf12e7da0ace532b96ae3 Mon Sep 17 00:00:00 2001 From: Paul-Edouard Sarlin Date: Mon, 3 Jan 2022 12:05:11 +0100 Subject: [PATCH] Fix pypi trigger conditions --- .github/workflows/build-new.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-new.yml b/.github/workflows/build-new.yml index e84673bb..05734b6b 100644 --- a/.github/workflows/build-new.yml +++ b/.github/workflows/build-new.yml @@ -7,8 +7,9 @@ on: pull_request: types: [ assigned, opened, synchronize, reopened ] release: - types: [published] + types: [published, edited] workflow_dispatch: + create: jobs: linux-build: @@ -40,7 +41,7 @@ jobs: - name: Publish package # We publish the wheel to pypi when a new tag is pushed, # either by creating a new GitHub release or explictly with `git tag` - if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') + if: ${{ github.event_name == 'release' || startsWith(github.ref, 'refs/tags') }} uses: pypa/gh-action-pypi-publish@release/v1 with: user: __token__ @@ -68,7 +69,7 @@ jobs: name: pycolmap-${{ matrix.pyversion }}-${{ matrix.os }} path: ./wheelhouse/pycolmap-*.whl - name: Publish package - if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') + if: ${{ github.event_name == 'release' || startsWith(github.ref, 'refs/tags') }} uses: pypa/gh-action-pypi-publish@release/v1 with: user: __token__