Skip to content

Commit 3e1c4c3

Browse files
committed
ci: Update artifact names and use trusted publishing
1 parent d251706 commit 3e1c4c3

File tree

1 file changed

+9
-13
lines changed

1 file changed

+9
-13
lines changed

.github/workflows/publish.yml

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ jobs:
3939

4040
- uses: actions/upload-artifact@v4
4141
with:
42-
path: ./wheelhouse/*.whl
42+
name: wheels-${{ matrix.os }}
43+
path: wheelhouse/*.whl
4344

4445

4546
build_sdist:
@@ -63,23 +64,18 @@ jobs:
6364

6465
- uses: actions/upload-artifact@v4
6566
with:
67+
name: wheels-sdist
6668
path: dist/*.tar.gz
6769

6870

6971
upload_pypi:
7072
needs: [build_wheels, build_sdist]
7173
runs-on: ubuntu-latest
74+
permissions:
75+
id-token: write
7276

7377
steps:
74-
- uses: actions/download-artifact@v4
75-
with:
76-
# unpacks default artifact into dist/
77-
# if `name: artifact` is omitted, the action will create extra parent dir
78-
name: artifact
79-
path: dist
80-
81-
- uses: pypa/[email protected]
82-
with:
83-
user: __token__
84-
password: ${{ secrets.PYPI_API_TOKEN }}
85-
# To test: repository_url: https://test.pypi.org/legacy/
78+
- uses: actions/download-artifact@v5
79+
- name: Publish distribution 📦 to PyPI
80+
uses: pypa/gh-action-pypi-publish@release/v1
81+

0 commit comments

Comments
 (0)