Skip to content

Commit de68bb5

Browse files
authored
chore: Add PyPi release workflow (#2)
Add a PyPi release GitHub Actions workflow that triggers a publish whenever a new GitHub release is created Signed-off-by: Costin Sin <cosin@google.com>
1 parent 8896ad6 commit de68bb5

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

.github/workflows/release.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Publish to PyPI
2+
3+
on:
4+
release:
5+
types: [published]
6+
permissions:
7+
contents: read
8+
9+
jobs:
10+
pypi-publish:
11+
name: Upload release to PyPI
12+
runs-on: ubuntu-latest
13+
environment:
14+
name: release
15+
url: https://pypi.org/p/ucp-sdk
16+
permissions:
17+
id-token: write
18+
contents: read
19+
steps:
20+
- name: Checkout code
21+
uses: actions/checkout@v4
22+
23+
# Installs uv (and manages Python automatically)
24+
- name: Install uv
25+
uses: astral-sh/setup-uv@v5
26+
with:
27+
enable-cache: true
28+
29+
# 'uv build' automatically creates the sdist and wheel inz 'dist/'
30+
- name: Build package
31+
run: uv build
32+
33+
- name: Publish to PyPI
34+
uses: pypa/gh-action-pypi-publish@release/v1

0 commit comments

Comments
 (0)