Skip to content

Commit

Permalink
ci: publish a new version only when creating tags (#678)
Browse files Browse the repository at this point in the history
  • Loading branch information
woqidaideshi committed Mar 8, 2023
1 parent 15f29e5 commit 93fb253
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/bagua-pypi-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
submodules: recursive
- run: git config --global --add safe.directory $(pwd) && BAGUA_NO_INSTALL_DEPS=1 python -m build -s
- name: Publish a Python distribution to PyPI
if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags')
if: github.ref == 'refs/heads/master' && startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
Expand All @@ -31,7 +31,7 @@ jobs:
dist/*
check_source_install:
if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags')
if: github.ref == 'refs/heads/master' && startsWith(github.ref, 'refs/tags')
runs-on: ubuntu-latest
container: baguasys/bagua:master-pytorch-1.9.0-cuda11.1-cudnn8
needs:
Expand All @@ -47,7 +47,7 @@ jobs:
python -m pip install --pre bagua==$(python setup.py --version) --upgrade
check_wheel_install:
if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags')
if: github.ref == 'refs/heads/master' && startsWith(github.ref, 'refs/tags')
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -144,7 +144,7 @@ jobs:
if-no-files-found: error

- name: Publish a Python distribution to PyPI
if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags')
if: github.ref == 'refs/heads/master' && startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
Expand Down

0 comments on commit 93fb253

Please sign in to comment.