Skip to content

Commit 2c9c573

Browse files
Set up publishing workflow to test pypi
1 parent 6850f97 commit 2c9c573

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Push latest bufbuild-protovalidate-protocolbuffers to PyPI
2+
on:
3+
schedule:
4+
- cron: "15 12 * * *"
5+
6+
permissions:
7+
contents: read
8+
9+
jobs:
10+
push-pypi:
11+
name: Push latest bufbuild-protovalidate-protocolbuffers to PyPI
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout code
15+
uses: actions/checkout@v5
16+
with:
17+
fetch-depth: 1
18+
- uses: astral-sh/setup-uv@v6
19+
with:
20+
python-version: 3.9
21+
- name: Install dependencies
22+
run: cd bufbuild-protovalidate-protocolbuffers && uv sync --frozen
23+
- name: Build and publish
24+
run: cd bufbuild-protovalidate-protocolbuffers && rm -rf dist && PROTOVALIDATE_VERSION="v0.11.0" make generate
25+
- name: Publish package distributions to TestPyPI
26+
# authorization is done via OIDC, so no token needed
27+
# Instead, we've set up a trusted publishing config for the pypi package, that maps to this repository and the
28+
# protovalidate-gencode-pypi-sync workflow and maps it to the bufbuild-protovalidate-protocolbuffers package on pypi
29+
uses: pypa/gh-action-pypi-publish@release/v1
30+
with:
31+
repository-url: https://test.pypi.org/legacy/

0 commit comments

Comments
 (0)