Skip to content

Commit

Permalink
chore: run ci on all branches, run publish job only on tags
Browse files Browse the repository at this point in the history
  • Loading branch information
ivan-aksamentov committed Nov 23, 2022
1 parent c6e741f commit 97674fd
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions .github/workflows/build_and_publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,10 @@ name: build_and_publish
on:
push:
tags:
- '*'
branches:
- '*'

pull_request:
branches:
- '*'

repository_dispatch:
types: build
Expand Down Expand Up @@ -105,6 +102,8 @@ jobs:
publish_to_pypi:
name: "Publish to PyPI"

if: startsWith(github.ref, 'refs/tags')

needs: [ run_cpp_tests, build_wheels, make_sdist ]

runs-on: ubuntu-22.04
Expand All @@ -120,7 +119,7 @@ jobs:
path: "dist"

- name: "Publish to PyPI"
uses: pypa/gh-action-pypi-publish@release/v1
if: startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}

0 comments on commit 97674fd

Please sign in to comment.