Skip to content

Commit 4410ffc

Browse files
Merge pull request #1 from saichandrapandraju/trusted-providers-workflow
Update publish workflow to Trusted Providers
2 parents 659fe12 + 691c816 commit 4410ffc

File tree

1 file changed

+22
-17
lines changed

1 file changed

+22
-17
lines changed

.github/workflows/publish.yml

Lines changed: 22 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,29 @@
11
name: Publish to PyPI
2-
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)