Skip to content

Commit fe58299

Browse files
committed
Add CI job to publish PyPI package
1 parent ee1ad92 commit fe58299

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

.github/workflows/publish.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Publish to PyPI
2+
3+
on:
4+
release:
5+
types:
6+
- published
7+
8+
permissions:
9+
contents: read
10+
11+
jobs:
12+
publish:
13+
environment:
14+
name: pypi
15+
url: https://pypi.org/p/openai-guardrails
16+
permissions:
17+
id-token: write # Important for trusted publishing to PyPI
18+
runs-on: ubuntu-latest
19+
20+
steps:
21+
- name: Checkout repository
22+
uses: actions/checkout@v4
23+
- name: Setup uv
24+
uses: astral-sh/setup-uv@v5
25+
with:
26+
enable-cache: true
27+
- name: Install dependencies
28+
run: make sync
29+
- name: Build package
30+
run: uv build
31+
- name: Publish to PyPI
32+
uses: pypa/gh-action-pypi-publish@release/v1

0 commit comments

Comments
 (0)