Skip to content

Commit

Permalink
only publish on main for schedule dispatch
Browse files Browse the repository at this point in the history
  • Loading branch information
samster25 committed Sep 26, 2023
1 parent 97845d3 commit 0d83135
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,6 @@ jobs:

publish:
name: Publish wheels to PYPI and Anaconda
if: ${{ (github.ref == 'refs/heads/main') }}
runs-on: ubuntu-latest
needs:
- build-and-test
Expand Down Expand Up @@ -166,7 +165,7 @@ jobs:
run: conda install -q -y anaconda-client "urllib3<2.0"

- name: Upload wheels to anaconda nightly
if: ${{ success() && (env.IS_SCHEDULE_DISPATCH == 'true' || env.IS_PUSH == 'true') }}
if: ${{ success() && (((env.IS_SCHEDULE_DISPATCH == 'true') && (github.ref == 'refs/heads/main')) || env.IS_PUSH == 'true') }}
shell: bash -el {0}
env:
DAFT_STAGING_UPLOAD_TOKEN: ${{ secrets.DAFT_STAGING_UPLOAD_TOKEN }}
Expand Down

0 comments on commit 0d83135

Please sign in to comment.