Skip to content

Commit

Permalink
skip publish for every commit
Browse files Browse the repository at this point in the history
  • Loading branch information
lu-wang-dl authored Aug 27, 2021
1 parent 72b3487 commit e04c4e5
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/publish-to-pypi.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# whenever you push a tagged commit to your Git repository remote on GitHub, this workflow will publish it to PyPI.
# And it’ll publish any push to TestPyPI which is useful for providing test builds.
# Follow the guide: https://packaging.python.org/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/

name: Publish AutoML runtime package to PyPI and TestPyPI
Expand Down Expand Up @@ -44,14 +43,17 @@ jobs:
python -m build --sdist --wheel --outdir dist/
working-directory: runtime
- name: Publish distribution to Test PyPI
uses: pypa/gh-action-pypi-publish@master
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
if: startsWith(github.ref, 'refs/tags')
packages_dir: runtime/dist/
repository_url: https://test.pypi.org/legacy/
skip_existing: true
- 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:
password: ${{ secrets.PYPI_API_TOKEN }}
packages_dir: runtime/dist/
skip_existing: true

0 comments on commit e04c4e5

Please sign in to comment.