File tree 2 files changed +31
-4
lines changed
2 files changed +31
-4
lines changed Original file line number Diff line number Diff line change 1
1
name : Publish to PyPI
2
2
3
3
on :
4
+ push :
5
+ branches : [main]
6
+ paths :
7
+ - ' pyproject.toml'
4
8
workflow_dispatch :
5
9
inputs :
6
10
version :
@@ -13,7 +17,22 @@ permissions:
13
17
id-token : write
14
18
15
19
jobs :
20
+ check-version :
21
+ runs-on : ubuntu-latest
22
+ outputs :
23
+ should_publish : ${{ steps.check.outputs.changed }}
24
+ steps :
25
+ - uses : actions/checkout@v4
26
+ with :
27
+ fetch-depth : 2
28
+ - id : check
29
+ run : |
30
+ CHANGED=$(git diff HEAD^ HEAD -- pyproject.toml | grep '+version' || true)
31
+ echo "changed=${CHANGED:+true}" >> $GITHUB_OUTPUT
32
+
16
33
deploy :
34
+ needs : check-version
35
+ if : needs.check-version.outputs.should_publish == 'true'
17
36
runs-on : ubuntu-latest
18
37
steps :
19
38
- uses : actions/checkout@v4
28
47
curl -LsSf https://astral.sh/uv/install.sh | sh
29
48
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
30
49
31
- - name : Build and publish
50
+ - name : Build package
51
+ run : uv build
52
+
53
+ - name : Publish to PyPI
32
54
env :
33
- UV_PUBLISH_TOKEN : ${{ secrets.PYPI_API_TOKEN }}
55
+ TWINE_USERNAME : __token__
56
+ TWINE_PASSWORD : ${{ secrets.PYPI_API_TOKEN }}
34
57
run : |
35
- uv build --no-sources
36
- uv publish
58
+ uv pip install twine
59
+ twine upload dist/*
Original file line number Diff line number Diff line change @@ -18,6 +18,10 @@ classifiers = [
18
18
" Topic :: Scientific/Engineering :: Artificial Intelligence" ,
19
19
]
20
20
21
+ [project .urls ]
22
+ Homepage = " https://github.com/eliotdoesprogramming/intent-service"
23
+ Repository = " https://github.com/eliotdoesprogramming/intent-service"
24
+
21
25
dependencies = [
22
26
" fastapi>=0.68.0,<1.0.0" ,
23
27
" pydantic>=2.4.2,<3.0.0" ,
You can’t perform that action at this time.
0 commit comments