Skip to content

Commit 8f6147a

Browse files
committed
uv publish
1 parent 76efe37 commit 8f6147a

File tree

2 files changed

+19
-47
lines changed

2 files changed

+19
-47
lines changed

.github/workflows/pypi.yml

Lines changed: 18 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,58 +1,30 @@
1-
name: Upload Python Package
1+
# publish.yml
22

3-
on:
4-
push:
5-
branches:
6-
- 'pypi'
3+
name: "Publish"
74

8-
permissions:
9-
contents: read
5+
on:
6+
release:
7+
types: ["published"]
108

119
jobs:
12-
release-build:
10+
run:
11+
name: "Build and publish release"
1312
runs-on: ubuntu-latest
1413

1514
steps:
16-
- uses: actions/checkout@v4 # Ensure actions are pinned properly
17-
18-
- uses: actions/setup-python@v5
19-
with:
20-
python-version: "3.x"
21-
22-
- name: Build release distributions
23-
run: |
24-
python -m pip install build
25-
python -m build
15+
- uses: actions/checkout@v4
2616

27-
- name: Upload distributions
28-
uses: actions/upload-artifact@v4
17+
- name: Install uv
18+
uses: astral-sh/setup-uv@v3
2919
with:
30-
name: release-dists
31-
path: dist/
32-
33-
publish:
34-
runs-on: ubuntu-latest
35-
36-
needs:
37-
- release-build
38-
39-
permissions:
40-
id-token: write
41-
contents: read # Added this permission
20+
enable-cache: true
21+
cache-dependency-glob: uv.lock
4222

43-
environment:
44-
name: publish
45-
url: https://pypi.org/p/cartiflette
23+
- name: Set up Python
24+
run: uv python install 3.12 # Or whatever version I want to use.
4625

47-
steps:
48-
- name: Retrieve release distributions
49-
uses: actions/download-artifact@v4
50-
with:
51-
name: release-dists
52-
path: dist/
26+
- name: Build
27+
run: uv build
5328

54-
- name: Publish release distributions to PyPI
55-
uses: pypa/gh-action-pypi-publish@release/v1
56-
with:
57-
user: __token__
58-
password: ${{ secrets.PYPI_PASSWORD }} # Ensure the secret name is correct
29+
- name: Publish
30+
run: uv publish --password ${{ secrets.PYPI_PASSWORD }}

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "cartiflette"
3-
version = "0.0.2"
3+
version = "0.0.3"
44
description = "Tools to easily retrieve French borders for geographic data analytics"
55
authors = [
66
{ name = "Lino Galiana", email = "lino.galiana@insee.fr" },

0 commit comments

Comments
 (0)