Skip to content

Commit dd81a93

Browse files
authored
Fix release workflow for breaking changes in upload/download artifact (#148)
1 parent 7feb3d0 commit dd81a93

File tree

1 file changed

+14
-6
lines changed

1 file changed

+14
-6
lines changed

.github/workflows/release-wheels.yml

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ jobs:
2222
- uses: actions/upload-artifact@v4
2323
with:
2424
path: dist/*.whl
25+
name: artifact-wheels
2526

2627
build_sdist:
2728
name: Build source distribution
@@ -38,19 +39,26 @@ jobs:
3839
- uses: actions/upload-artifact@v4
3940
with:
4041
path: dist/*.tar.gz
42+
name: artifact-sdist
4143

4244
upload_pypi:
4345
needs: [build_wheels, build_sdist]
4446
runs-on: ubuntu-latest
47+
permissions:
48+
contents: write # IMPORTANT: mandatory for making GitHub Releases
49+
id-token: write # IMPORTANT: mandatory for trusted publishing & sigstore
50+
51+
environment:
52+
name: pypi
53+
url: https://pypi.org/p/aiodns
4554
# upload to PyPI when a GitHub Release is created
4655
if: github.event_name == 'release' && github.event.action == 'published'
4756
steps:
4857
- uses: actions/[email protected]
4958
with:
50-
name: artifact
59+
pattern: artifact-*
5160
path: dist
52-
53-
- uses: pypa/gh-action-pypi-publish@master
54-
with:
55-
user: __token__
56-
password: ${{ secrets.pypi_password }}
61+
merge-multiple: true
62+
63+
- uses: pypa/gh-action-pypi-publish@release/v1
64+
name: Publish package distributions to PyPI

0 commit comments

Comments
 (0)