Skip to content

Commit fdd4a18

Browse files
committed
1 parent ef49d81 commit fdd4a18

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed

.github/workflows/publish.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Build and publish to PyPI
2+
on: [push, pull_request]
3+
jobs:
4+
build:
5+
name: Build distribution
6+
runs-on: ubuntu-latest
7+
steps:
8+
- uses: actions/checkout@v5
9+
with:
10+
submodules: true
11+
- name: Set up Python
12+
uses: actions/setup-python@v6
13+
with:
14+
python-version: "3"
15+
- name: Install "build"
16+
run: |
17+
python -m pip install build
18+
- name: Build binary wheels and a source tarball
19+
run: ./make_dist.sh
20+
- name: Store the distribution packages
21+
uses: actions/upload-artifact@v4
22+
with:
23+
name: dist
24+
path: dist
25+
publish:
26+
name: Upload release to PyPI
27+
if: startsWith(github.ref, 'refs/tags/')
28+
needs:
29+
- build
30+
runs-on: ubuntu-latest
31+
environment:
32+
name: pypi
33+
url: https://pypi.org/p/sounddevice
34+
permissions:
35+
id-token: write
36+
steps:
37+
- name: Get the artifacts
38+
uses: actions/download-artifact@v5
39+
with:
40+
name: dist
41+
path: dist
42+
- name: Publish package distributions to PyPI
43+
uses: pypa/gh-action-pypi-publish@release/v1
44+
with:
45+
print-hash: true

0 commit comments

Comments
 (0)