Skip to content

Commit 52a2977

Browse files
committed
push light client on Pypi
1 parent 0ff06c3 commit 52a2977

File tree

3 files changed

+26
-42
lines changed

3 files changed

+26
-42
lines changed

.github/workflows/publish-client.yml

Lines changed: 0 additions & 31 deletions
This file was deleted.

.github/workflows/pypi.yml

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,28 +3,36 @@
33
name: "Publish"
44

55
on:
6-
release:
7-
types: ["published"]
6+
push:
7+
tags:
8+
- 'v*'
89

910
jobs:
10-
run:
11-
name: "Build and publish release"
11+
release:
12+
name: Publish to PyPI
1213
runs-on: ubuntu-latest
13-
14+
defaults:
15+
run:
16+
working-directory: ./python-package/cartiflette
17+
environment: pypi
18+
permissions:
19+
id-token: write
1420
steps:
1521
- uses: actions/checkout@v4
1622

17-
- name: Install uv
18-
uses: astral-sh/setup-uv@v3
23+
- name: Install uv and setup the python version
24+
uses: astral-sh/setup-uv@v5
1925
with:
2026
enable-cache: true
2127
cache-dependency-glob: uv.lock
2228

23-
- name: Set up Python
24-
run: uv python install 3.12 # Or whatever version I want to use.
29+
- name: Install the project
30+
run: uv sync --all-groups
2531

26-
- name: Build
32+
- name: Build wheel
2733
run: uv build
2834

29-
- name: Publish
35+
- name: Publish package
3036
run: uv publish --token ${{ secrets.PAT_PYPI }}
37+
38+

pyproject.toml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,3 +53,10 @@ log_cli = true
5353
log_cli_level = "WARNING"
5454
log_cli_format = "%(asctime)s [%(levelname)8s] %(message)s (%(filename)s:%(lineno)s)"
5555
log_cli_date_format = "%Y-%m-%d %H:%M:%S"
56+
57+
58+
[[tool.uv.index]]
59+
name = "testpypi"
60+
url = "https://test.pypi.org/simple/"
61+
publish-url = "https://test.pypi.org/legacy/"
62+
explicit = true

0 commit comments

Comments
 (0)