-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (40 loc) · 1.21 KB
/
publish_python.yml
File metadata and controls
48 lines (40 loc) · 1.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
name: Publish - Python
on:
push:
tags:
- 'python@*'
jobs:
publish_python_sdk:
name: Publish Python SDK
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
packages: write
steps:
- uses: actions/checkout@v4
- name: Extract tag version
uses: ./.github/actions/extract_version
id: version
- name: Install uv
run: |
curl -LsSf https://astral.sh/uv/install.sh | sh
- name: Build package
run: |
cd client_sdks/python
uv build
- name: Verify versions match
run: |
cd client_sdks/python
uv venv
uv sync
PACKAGE_VERSION=$(uv pip show tacoq | grep Version | cut -d' ' -f2)
if [ "$PACKAGE_VERSION" != "${{ steps.version.outputs.version }}" ]; then
echo "Version mismatch! Tag version: ${{ steps.version.outputs.version }}, Package version: $PACKAGE_VERSION"
echo "Please update the version in the release tag and pyproject.toml so that they are compatible and try again."
exit 1
fi
- name: Publish package to PyPI
run: |
cd client_sdks/python
uv publish