Skip to content

Commit de128b4

Browse files
use pypa/gh-action-pypi-publish (#1599)
Co-authored-by: David Hewitt <david.hewitt@pydantic.dev>
1 parent 4375d6a commit de128b4

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

.github/workflows/ci.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -662,6 +662,10 @@ jobs:
662662
needs: [test-builds-arch, test-builds-os, build-sdist, check]
663663
if: always() && startsWith(github.ref, 'refs/tags/')
664664
runs-on: ubuntu-latest
665+
environment: release
666+
667+
permissions:
668+
id-token: write
665669

666670
steps:
667671
- uses: actions/checkout@v4
@@ -685,11 +689,10 @@ jobs:
685689

686690
- run: twine check --strict dist/*
687691

688-
- name: upload to pypi
689-
run: twine upload dist/*
690-
env:
691-
TWINE_USERNAME: __token__
692-
TWINE_PASSWORD: ${{ secrets.pypi_token }}
692+
- name: Publish to PyPI
693+
uses: pypa/gh-action-pypi-publish@v1
694+
with:
695+
skip-existing: true
693696

694697
- name: get wasm dist artifacts
695698
uses: actions/download-artifact@v4

0 commit comments

Comments
 (0)