Skip to content

Commit 8368541

Browse files
update workflow to trusted providers
1 parent 659fe12 commit 8368541

File tree

1 file changed

+23
-18
lines changed

1 file changed

+23
-18
lines changed

.github/workflows/publish.yml

Lines changed: 23 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,29 @@
1-
name: Publish to PyPI
2-
1+
name: Publish to PyPi
32
on:
43
release:
54
types: [published]
6-
75
jobs:
8-
publish:
6+
pypi-publish:
7+
name: upload release to PyPi
98
runs-on: ubuntu-latest
9+
environment:
10+
name: pypi
11+
url: https://pypi.org/p/vllm-judge
12+
permissions:
13+
id-token: write
1014
steps:
11-
- uses: actions/checkout@v3
12-
- uses: actions/setup-python@v4
13-
with:
14-
python-version: '3.8'
15-
- name: Install dependencies
16-
run: |
17-
pip install build twine
18-
- name: Build package
19-
run: python -m build
20-
- name: Publish to PyPI
21-
env:
22-
TWINE_USERNAME: __token__
23-
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
24-
run: twine upload dist/*
15+
- name: Checkout
16+
uses: actions/checkout@v3
17+
- name: Set up Python
18+
uses: actions/setup-python@v4
19+
with:
20+
python-version: '3.10'
21+
- name: Install dependencies
22+
run: |
23+
python3 -m pip install --upgrade pip
24+
pip install build
25+
- name: Build package
26+
run: |
27+
python3 -m build
28+
- name: Publish package
29+
uses: pypa/gh-action-pypi-publish@release/v1

0 commit comments

Comments
 (0)