ci: enable pull_request trigger
This commit is contained in:
parent
ce157c47cc
commit
c83bfbd21c
1 changed files with 5 additions and 3 deletions
8
.github/workflows/main.yml
vendored
8
.github/workflows/main.yml
vendored
|
@ -5,8 +5,10 @@ on:
|
|||
push:
|
||||
branches: '*'
|
||||
tags: 'v[0-9]+.*' # only trigger on 'release' tags for PyPi
|
||||
# TODO not sure if need 'pull_request'??
|
||||
# Note that people who fork it need to go to "Actions" tab on their fork and click "I understand my workflows, go ahead and enable them".
|
||||
pull_request: # needed to trigger on others' PRs
|
||||
workflow_dispatch: # needed to trigger workflows manually
|
||||
# todo cron?
|
||||
|
||||
env:
|
||||
# useful for scripts & sometimes tests to know
|
||||
|
@ -65,7 +67,7 @@ jobs:
|
|||
|
||||
- name: 'release to test pypi'
|
||||
# always deploy merged master to test pypi
|
||||
if: github.event.ref == 'refs/heads/master'
|
||||
if: github.event_name != 'pull_request' && github.event.ref == 'refs/heads/master'
|
||||
env:
|
||||
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD_TEST }}
|
||||
run: pip3 install --user wheel twine && scripts/release --test
|
||||
|
@ -74,7 +76,7 @@ jobs:
|
|||
- name: 'release to pypi'
|
||||
# always deploy tags to release pypi
|
||||
# NOTE: release tags are guarded by on: push: tags on the top
|
||||
if: startsWith(github.event.ref, 'refs/tags')
|
||||
if: github.event_name != 'pull_request' && startsWith(github.event.ref, 'refs/tags')
|
||||
env:
|
||||
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}
|
||||
run: pip3 install --user wheel twine && scripts/release
|
||||
|
|
Loading…
Add table
Reference in a new issue