Skip to content

Commit 7d1f553

Browse files
committed
set up trusted publishing for PyPI uploads
Signed-off-by: Lance-Drane <Lance-Drane@users.noreply.github.com>
1 parent a2ca83e commit 7d1f553

1 file changed

Lines changed: 10 additions & 8 deletions

File tree

.github/workflows/publish.yml

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,16 @@ on:
66
- "v[0-9]+.[0-9]+.[0-9]+*"
77
workflow_dispatch:
88

9-
permissions:
10-
contents: write
11-
id-token: write
12-
139
jobs:
14-
build:
10+
publish:
1511
if: startsWith(github.ref, 'refs/tags/')
1612
runs-on: ubuntu-latest
13+
permissions:
14+
contents: write
15+
id-token: write
16+
environment:
17+
name: pypi
18+
url: https://pypi.org/p/intersect-sdk-common
1719
steps:
1820
- uses: actions/checkout@v4
1921
- name: Setup UV
@@ -23,9 +25,9 @@ jobs:
2325
- name: "Build package"
2426
run: uv build
2527
- name: Publish package to PyPI
26-
env:
27-
UV_PUBLISH_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
28-
run: uv publish --username __token__ --publish-url https://upload.pypi.org/legacy/
28+
uses: pypa/gh-action-pypi-publish@release/v1
29+
with:
30+
repository-url: https://upload.pypi.org/legacy/
2931
- name: upload to github release
3032
uses: docker://antonyurchenko/git-release:v5
3133
env:

0 commit comments

Comments
 (0)