Skip to content

Commit fb58175

Browse files
authored
GitHub pypi (#198)
* Create publish.yml taken from https://github.com/spatialaudio/python-sounddevice/blob/master/.github/workflows/publish.yml * Update publish.yml prep for sfs
1 parent ef49d81 commit fb58175

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed

.github/workflows/publish.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
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: Store the distribution packages
19+
uses: actions/upload-artifact@v4
20+
with:
21+
name: dist
22+
path: dist
23+
publish:
24+
name: Upload release to PyPI
25+
if: startsWith(github.ref, 'refs/tags/')
26+
needs:
27+
- build
28+
runs-on: ubuntu-latest
29+
environment:
30+
name: pypi
31+
url: https://pypi.org/p/sfs
32+
permissions:
33+
id-token: write
34+
steps:
35+
- name: Get the artifacts
36+
uses: actions/download-artifact@v5
37+
with:
38+
name: dist
39+
path: dist
40+
- name: Publish package distributions to PyPI
41+
uses: pypa/gh-action-pypi-publish@release/v1
42+
with:
43+
print-hash: true

0 commit comments

Comments
 (0)