Skip to content

Commit

Permalink
Update publish.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
AstralScribe authored Oct 10, 2024
1 parent 46bc167 commit d88282c
Showing 1 changed file with 74 additions and 77 deletions.
151 changes: 74 additions & 77 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
- name: Install pybind11
run: python3 -m pip install "pybind11[global]"

- name: Build sdist & wheel
- name: Build sdist
run: |
python3 -m pip install setuptools wheel cmake pybind11 build
python3 -m build --sdist
Expand All @@ -48,7 +48,6 @@ jobs:
name: dist-architecture-independent
path: |
dist/*.tar.gz
dist/*.whl
build_wheels:
name: Build wheels on ${{ matrix.os }}
Expand Down Expand Up @@ -91,19 +90,6 @@ jobs:
name: dist-${{ matrix.os }}
path: wheelhouse/*.whl

# - name: Install cibuildwheel
# run: python3 -m pip install cibuildwheel
#
# - name: Build wheels
# run: python3 -m cibuildwheel --output-dir dist
# env:
# CIBW_BEFORE_BUILD: "python3 -m pip install pybind11[global]"
# CIBW_SKIP: "*musllinux*"
#
# - uses: actions/upload-artifact@v3
# with:
# path: dist/

publish-to-pypi:
name: Publish Python 🐍 distribution 📦 to PyPI
needs:
Expand Down Expand Up @@ -136,65 +122,76 @@ jobs:
with:
skip_existing: true

# github-release:
# name: >-
# Sign the Python 🐍 distribution 📦 with Sigstore
# and upload them to GitHub Release
# needs:
# - publish-to-pypi
# runs-on: ubuntu-latest
#
# permissions:
# contents: write
# id-token: write
#
# steps:
# - name: Download all the dists
# uses: actions/download-artifact@v3
# with:
# path: dist/
# - name: Sign the dists with Sigstore
# uses: sigstore/gh-action-sigstore-python@v2.1.1
# with:
# inputs: >-
# ./dist/*.tar.gz
# ./dist/*.whl
# - name: Create GitHub Release
# env:
# GITHUB_TOKEN: ${{ github.token }}
# run: >-
# gh release create
# '${{ github.ref_name }}'
# --repo '${{ github.repository }}'
# --notes ""
# - name: Upload artifact signatures to GitHub Release
# env:
# GITHUB_TOKEN: ${{ github.token }}
# run: >-
# gh release upload
# '${{ github.ref_name }}' dist/**
# --repo '${{ github.repository }}'

# publish-to-testpypi:
# name: Publish Python 🐍 distribution 📦 to TestPyPI
# needs:
# - build_wheels
# runs-on: ubuntu-latest
#
# environment:
# name: release-test
# url: https://test.pypi.org/p/python-audio
#
# permissions:
# id-token: write
#
# steps:
# - name: Download all the dists
# uses: actions/download-artifact@v3
# with:
# path: dist/
# - name: Publish distribution 📦 to TestPyPI
# uses: pypa/gh-action-pypi-publish@release/v1
# with:
# repository-url: https://test.pypi.org/legacy/
# verbose: true
github-release:
name: >-
Sign the Python 🐍 distribution 📦 with Sigstore
and upload them to GitHub Release
needs:
- publish-to-pypi
runs-on: ubuntu-latest

permissions:
contents: write
id-token: write

steps:
- name: Download all the dists
uses: actions/download-artifact@v3
with:
path: dist/
- name: Sign the dists with Sigstore
uses: sigstore/gh-action-sigstore-python@v2.1.1
with:
inputs: >-
./dist/*.tar.gz
./dist/*.whl
- name: Create GitHub Release
env:
GITHUB_TOKEN: ${{ github.token }}
run: >-
gh release create
'${{ github.ref_name }}'
--repo '${{ github.repository }}'
--notes ""
- name: Upload artifact signatures to GitHub Release
env:
GITHUB_TOKEN: ${{ github.token }}
run: >-
gh release upload
'${{ github.ref_name }}' dist/**
--repo '${{ github.repository }}'
publish-to-testpypi:
name: Publish Python 🐍 distribution 📦 to TestPyPI
needs:
- build_sdist
- build_wheels
runs-on: ubuntu-latest

environment:
name: release-test
url: https://test.pypi.org/p/python-audio

permissions:
id-token: write
attestations: write
contents: write

steps:
- name: Download all the dists
uses: actions/download-artifact@v4
with:
pattern: dist-*
merge-multiple: true
path: dist

- name: Attest provenance
uses: actions/attest-build-provenance@v1
with:
subject-path: dist/*

- name: Publish distribution 📦 to TestPyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/
skip_existing: true

0 comments on commit d88282c

Please sign in to comment.