ci: enable pull_request trigger

This commit is contained in:
Dima Gerasimov 2021-03-10 07:07:38 +00:00
parent ce157c47cc
commit c83bfbd21c

View file

@ -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