From fdd4a18cd1d1567a18e31cfeef8c3b3c66d9040b Mon Sep 17 00:00:00 2001 From: Frank Schultz Date: Thu, 9 Oct 2025 18:06:04 +0200 Subject: [PATCH 1/2] Create publish.yml taken from https://github.com/spatialaudio/python-sounddevice/blob/master/.github/workflows/publish.yml --- .github/workflows/publish.yml | 45 +++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 .github/workflows/publish.yml diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 00000000..b3cff8d9 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,45 @@ +name: Build and publish to PyPI +on: [push, pull_request] +jobs: + build: + name: Build distribution + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v5 + with: + submodules: true + - name: Set up Python + uses: actions/setup-python@v6 + with: + python-version: "3" + - name: Install "build" + run: | + python -m pip install build + - name: Build binary wheels and a source tarball + run: ./make_dist.sh + - name: Store the distribution packages + uses: actions/upload-artifact@v4 + with: + name: dist + path: dist + publish: + name: Upload release to PyPI + if: startsWith(github.ref, 'refs/tags/') + needs: + - build + runs-on: ubuntu-latest + environment: + name: pypi + url: https://pypi.org/p/sounddevice + permissions: + id-token: write + steps: + - name: Get the artifacts + uses: actions/download-artifact@v5 + with: + name: dist + path: dist + - name: Publish package distributions to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 + with: + print-hash: true From 4e95551930b4b977f40f508f72b636966eee6ac3 Mon Sep 17 00:00:00 2001 From: Frank Schultz Date: Thu, 9 Oct 2025 18:31:27 +0200 Subject: [PATCH 2/2] Update publish.yml prep for sfs --- .github/workflows/publish.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index b3cff8d9..6763af0a 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -15,8 +15,6 @@ jobs: - name: Install "build" run: | python -m pip install build - - name: Build binary wheels and a source tarball - run: ./make_dist.sh - name: Store the distribution packages uses: actions/upload-artifact@v4 with: @@ -30,7 +28,7 @@ jobs: runs-on: ubuntu-latest environment: name: pypi - url: https://pypi.org/p/sounddevice + url: https://pypi.org/p/sfs permissions: id-token: write steps: