From 4c3cbf702c9e371ff1bc93d68fb16242f498a8e6 Mon Sep 17 00:00:00 2001 From: Yannick Jadoul Date: Tue, 2 Jun 2020 22:09:33 +0200 Subject: [PATCH] Update examples/github-deploy.yml to upload on tags, as alternative to GitHub releases Co-authored-by: Joe Rickerby --- examples/github-deploy.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/examples/github-deploy.yml b/examples/github-deploy.yml index f54bd0c4..7370b6cd 100644 --- a/examples/github-deploy.yml +++ b/examples/github-deploy.yml @@ -77,4 +77,7 @@ jobs: user: __token__ password: ${{ secrets.pypi_password }} # To test: repository_url: https://test.pypi.org/legacy/ - if: github.event_name == 'release' && github.event.action == 'published' + # upload to PyPI on every tag starting with 'v' + if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v') + # alternatively, to publish when a GitHub Release is created, use the following rule: + # if: github.event_name == 'release' && github.event.action == 'published'