Skip to content

Commit 81dfe51

Browse files
btabacopybara-github
authored andcommitted
pypi
PiperOrigin-RevId: 774862551 Change-Id: I9c9b68ebaed39b9d631d03d26fddf03403fb9135
1 parent 8e7f317 commit 81dfe51

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

.github/workflows/pypi.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Upload Python Package
2+
3+
on:
4+
release:
5+
types: [created]
6+
7+
jobs:
8+
deploy:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- uses: actions/checkout@v2
13+
- name: Set up Python
14+
uses: actions/setup-python@v4
15+
with:
16+
python-version: "3.10"
17+
- name: Install dependencies
18+
run: |
19+
pip install uv
20+
uv pip install --system -e ".[dev]"
21+
uv pip install --system build twine
22+
- name: Build and publish
23+
env:
24+
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
25+
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
26+
run: |
27+
python -m build
28+
twine upload --username $TWINE_USERNAME --password $TWINE_PASSWORD dist/*

0 commit comments

Comments
 (0)