|
7 | 7 | tags: 'v[0-9]+.*' # only trigger on 'release' tags for PyPi |
8 | 8 | # Ideally I would put this in the pypi job... but github syntax doesn't allow for regexes there :shrug: |
9 | 9 | # P.S. fuck made up yaml DSLs. |
10 | | - # TODO cron? |
| 10 | + pull_request: # needed to trigger on others' PRs |
| 11 | + # 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". |
11 | 12 | workflow_dispatch: # needed to trigger workflows manually |
| 13 | + # todo cron? |
12 | 14 |
|
13 | 15 | env: |
14 | 16 | # useful for scripts & sometimes tests to know |
|
18 | 20 | build: |
19 | 21 | strategy: |
20 | 22 | matrix: |
21 | | - platform: [ubuntu-latest] # macos-latest] # TODO windows-latest?? |
22 | | - python-version: [3.6, 3.7, 3.8] |
| 23 | + platform: [ubuntu-latest, macos-latest] # TODO windows-latest?? |
| 24 | + python-version: [3.6, 3.7, 3.8, 3.9] |
23 | 25 |
|
24 | 26 | runs-on: ${{ matrix.platform }} |
25 | 27 |
|
|
36 | 38 | submodules: recursive |
37 | 39 |
|
38 | 40 | # uncomment for SSH debugging |
39 | | - # - uses: mxschmitt/action-tmate@v2 |
| 41 | + # - uses: mxschmitt/action-tmate@v3 |
40 | 42 |
|
41 | 43 | - run: .ci/run |
42 | 44 |
|
@@ -64,15 +66,15 @@ jobs: |
64 | 66 |
|
65 | 67 | - name: 'release to test pypi' |
66 | 68 | # always deploy merged master to test pypi |
67 | | - if: github.event.ref == 'refs/heads/master' |
| 69 | + if: github.event_name != 'pull_request' && github.event.ref == 'refs/heads/master' |
68 | 70 | env: |
69 | 71 | TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD_TEST }} |
70 | 72 | run: pip3 install --user wheel twine && .ci/release --test |
71 | 73 |
|
72 | 74 | - name: 'release to pypi' |
73 | 75 | # always deploy tags to release pypi |
74 | 76 | # NOTE: release tags are guarded by on: push: tags on the top |
75 | | - if: startsWith(github.event.ref, 'refs/tags') |
| 77 | + if: github.event_name != 'pull_request' && startsWith(github.event.ref, 'refs/tags') |
76 | 78 | env: |
77 | 79 | TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }} |
78 | 80 | run: pip3 install --user wheel twine && .ci/release |
0 commit comments