Skip to content

Commit

Permalink
Merge pull request #104 from CUQI-DTU/run_release_pipelin_on_release_…
Browse files Browse the repository at this point in the history
…creation

Run release pipeline on created release
  • Loading branch information
nabriis committed Sep 19, 2022
2 parents f75aebf + 64f231a commit 95d568a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .github/workflows/publish_pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ on:
push:
branches:
- main
release:
types: [created]

jobs:
build-n-publish:
Expand Down Expand Up @@ -32,12 +34,13 @@ jobs:
--outdir dist/
.
- name: Publish to Test PyPI
if: github.event_name == 'push'
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
repository_url: https://test.pypi.org/legacy/
- name: Publish to PyPI
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
if: github.event_name == 'release' && github.event.action == 'created' && startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}

0 comments on commit 95d568a

Please sign in to comment.