File tree Expand file tree Collapse file tree 2 files changed +19
-47
lines changed
Expand file tree Collapse file tree 2 files changed +19
-47
lines changed Original file line number Diff line number Diff line change 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
119jobs :
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 }}
Original file line number Diff line number Diff line change 11[project ]
22name = " cartiflette"
3- version = " 0.0.2 "
3+ version = " 0.0.3 "
44description = " Tools to easily retrieve French borders for geographic data analytics"
55authors = [
66 { name = " Lino Galiana" , email = " lino.galiana@insee.fr" },
You can’t perform that action at this time.
0 commit comments