@@ -16,12 +16,11 @@ jobs:
1616 pip install -U cython setuptools
1717 python scripts/fetch-vendor.py --config-file scripts/ffmpeg-latest.json /tmp/vendor
1818 PKG_CONFIG_PATH=/tmp/vendor/lib/pkgconfig python setup.py sdist
19- - name : Publish to PyPI
20- if : github.event_name == 'release' && github.event.action == 'published'
21- uses : pypa/gh-action-pypi-publish@release/v1
19+ - name : Upload source package
20+ uses : actions/upload-artifact@v6
2221 with :
23- user : __token__
24- password : ${{ secrets.PYPI_TOKEN }}
22+ name : dist-source
23+ path : dist/
2524
2625 package-wheel :
2726 runs-on : ${{ matrix.os }}
@@ -73,20 +72,29 @@ jobs:
7372 cibuildwheel --output-dir dist
7473 shell : bash
7574 - name : Upload wheels
76- uses : actions/upload-artifact@v4
75+ uses : actions/upload-artifact@v6
7776 with :
7877 name : dist-${{ matrix.os }}-${{ matrix.arch }}
7978 path : dist/
8079
8180 publish :
8281 runs-on : ubuntu-latest
83- needs : [package-wheel]
82+ needs : [package-source, package- wheel]
8483 steps :
8584 - uses : actions/checkout@v6
86- - uses : actions/download-artifact@v4
85+ - uses : actions/download-artifact@v7
8786 with :
8887 merge-multiple : true
8988 path : dist/
89+
90+ - name : Publish to GitHub
91+ if : github.event_name == 'release'
92+ uses : softprops/action-gh-release@v1
93+ with :
94+ files : dist/*
95+ env :
96+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
97+
9098 - name : Publish to PyPI
9199 if : github.event_name == 'release' && github.event.action == 'published'
92100 uses : pypa/gh-action-pypi-publish@release/v1
0 commit comments