Skip to content

Commit 232c898

Browse files
authored
Run the release workflow on every push to main branch (#127)
The goal is to test the packaging of the lib earlier than when we are actually doing the release. The publication to pypi is now triggered by releases on github (instead of the push of tags).
1 parent 1be6bfe commit 232c898

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

.github/workflows/buildwheels.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,14 @@
88
name: Build and upload wheels
99

1010
on:
11+
workflow_dispatch:
1112
push:
12-
tags:
13-
- '[0-9]+\.[0-9]+\.[0-9]+'
14-
- '[0-9]+\.[0-9]+\.[0-9]+\.dev[0-9]+'
13+
branches:
14+
- master
15+
release:
16+
types:
17+
- released
18+
- prereleased
1519

1620
jobs:
1721

@@ -77,19 +81,15 @@ jobs:
7781
path: dist
7882

7983
- uses: pypa/[email protected]
80-
# PRODUCTION PYPI: tags not containing dev.
81-
# Note that the tags are already validated to control the running of
82-
# this workflow!
83-
if: "!contains(github.ref, 'dev')"
84+
# Deploy releases to pypi.
85+
if: github.event_name == 'release' && github.event.action == 'released'
8486
with:
8587
user: __token__
8688
password: ${{ secrets.PYPI_API_TOKEN }}
8789

8890
- uses: pypa/[email protected]
89-
# Deploy tags containing 'dev' to test pypi.
90-
# Note that the tags are already validated to control the running of
91-
# this workflow!
92-
if: contains(github.ref, 'dev')
91+
# Deploy pre-releases to test pypi.
92+
if: github.event_name == 'release' && github.event.action == 'prereleased'
9393
with:
9494
user: __token__
9595
password: ${{ secrets.TEST_PYPI_API_TOKEN }}

0 commit comments

Comments
 (0)