Skip to content

Commit e77c014

Browse files
authored
Update build-publish.yml
1 parent d0470fa commit e77c014

File tree

1 file changed

+17
-26
lines changed

1 file changed

+17
-26
lines changed

.github/workflows/build-publish.yml

Lines changed: 17 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -7,31 +7,21 @@
77
name: build-publish
88

99
on:
10+
workflow_dispatch:
11+
push:
12+
branches: [master]
13+
pull_request:
14+
paths:
15+
- '.github/workflows/build-publish.yml'
1016
release:
1117
types: [published]
1218

1319
jobs:
14-
build-wheels:
15-
runs-on: ${{ matrix.os }}
20+
build:
21+
name: Build sdist and wheel
22+
runs-on: ubuntu-latest
1623
permissions:
17-
contents: read
18-
strategy:
19-
matrix:
20-
include:
21-
- os: ubuntu-latest
22-
python: 39
23-
platform: manylinux_x86_64
24-
- os: ubuntu-latest
25-
python: 310
26-
platform: manylinux_x86_64
27-
- os: ubuntu-latest
28-
python: 311
29-
platform: manylinux_x86_64
30-
- os: ubuntu-latest
31-
python: 312
32-
platform: manylinux_x86_64
33-
34-
24+
contents: read
3525
steps:
3626
- uses: actions/checkout@v4
3727
- name: Set up Python
@@ -40,20 +30,21 @@ jobs:
4030
python-version: 3.x
4131
- name: Install dependencies
4232
run: python -m pip install --upgrade setuptools wheel build
43-
- name: Build wheels
33+
- name: Build sdist and wheel
4434
run: python -m build --sdist --wheel
45-
- name: Store wheels
35+
- name: Store sdist and wheel
4636
uses: actions/upload-artifact@v4
4737
with:
38+
name: artifact
4839
path: dist
49-
5040
publish:
41+
name: Publish to PyPI
42+
needs: [build]
5143
runs-on: ubuntu-latest
52-
needs:
53-
- build-wheels
44+
environment: pypi
5445
if: github.event_name == 'release' && github.event.action == 'published'
5546
steps:
56-
- name: Download dists
47+
- name: Download dist
5748
uses: actions/download-artifact@v4
5849
with:
5950
name: artifact

0 commit comments

Comments
 (0)