Skip to content

Commit f6d9fd2

Browse files
authored
feat: use PyPI OIDC for release (#1957)
Signed-off-by: Keming <kemingyang@tensorchord.ai>
1 parent 600e0df commit f6d9fd2

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

.github/workflows/release.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ jobs:
4545
if: github.repository == 'tensorchord/envd' && startsWith(github.ref, 'refs/tags/v')
4646
runs-on: ${{ matrix.os }}
4747
timeout-minutes: 20
48+
permissions:
49+
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
4850
strategy:
4951
matrix:
5052
os: [macos-13, ubuntu-22.04]
@@ -83,14 +85,12 @@ jobs:
8385
python -m pip install wheel
8486
python setup.py sdist
8587
mv dist/*.tar.gz wheelhouse/
86-
- name: Upload to PyPI
87-
env:
88-
TWINE_USERNAME: __token__
89-
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
90-
run: |
91-
python -m pip install --upgrade pip
92-
python -m pip install twine
93-
python -m twine upload wheelhouse/*
88+
- name: Publish package distributions to PyPI
89+
uses: pypa/gh-action-pypi-publish@release/v1
90+
with:
91+
packages-dir: wheelhouse/
92+
skip-existing: true
93+
verbose: true
9494
image_publish:
9595
name: Build & push images
9696
# only trigger on main repo when tag starts with v

0 commit comments

Comments
 (0)