Skip to content

Commit 2f7f426

Browse files
committed
ci: fix PyPI publishing workflow to use token authentication
1 parent 259b836 commit 2f7f426

File tree

1 file changed

+18
-11
lines changed

1 file changed

+18
-11
lines changed

.github/workflows/publish.yml

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
1-
name: Publish
1+
name: Publish to PyPI
22

33
on:
4-
release:
5-
types: [created]
64
push:
75
tags:
86
- "v*"
@@ -11,16 +9,25 @@ jobs:
119
pypi-publish:
1210
name: Upload release to PyPI
1311
runs-on: ubuntu-latest
14-
environment:
15-
name: pypi
16-
url: https://pypi.org/p/llmembed
1712
permissions:
18-
id-token: write
13+
contents: read
14+
1915
steps:
20-
- uses: actions/checkout@v4
16+
- name: Checkout code
17+
uses: actions/checkout@v4
18+
2119
- name: Install uv
22-
uses: astral-sh/setup-uv@v3
20+
uses: astral-sh/setup-uv@v5
21+
with:
22+
version: "latest"
23+
24+
- name: Set up Python
25+
uses: actions/setup-python@v5
26+
with:
27+
python-version: "3.12"
28+
2329
- name: Build package
2430
run: uv build
25-
- name: Publish package distributions to PyPI
26-
uses: pypa/gh-action-pypi-publish@release/v1
31+
32+
- name: Publish package
33+
run: uv publish --token ${{ secrets.PYPI_TOKEN }}

0 commit comments

Comments
 (0)