@@ -60,26 +60,42 @@ jobs:
60
60
with :
61
61
github-token : ${{ secrets.GITHUB_TOKEN }}
62
62
path-to-lcov : coverage.lcov
63
- deploy :
64
- name : Deploy to PyPi
63
+ build :
64
+ name : Build pydantic2ts for distribution
65
+ if : github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
65
66
needs : test
66
67
runs-on : ubuntu-latest
67
- if : github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
68
68
steps :
69
69
- name : Check out repo
70
70
uses : actions/checkout@v4
71
- - name : Set up Python 3.9
72
- uses : actions /setup-python@v5
71
+ - name : Install uv
72
+ uses : astral-sh /setup-uv@v3
73
73
with :
74
- python-version : 3.9
75
- - name : Install dependencies
76
- run : |
77
- python -m pip install -U pip wheel
78
- - name : Build dist
79
- run : |
80
- python setup.py sdist bdist_wheel bdist_egg
81
- - name : Publish package
82
- uses : pypa/gh-action-pypi-publish@v1.5.0
74
+ version : " 0.5.2"
75
+ - name : Install python 3.9
76
+ run : uv python install 3.9
77
+ - name : Build pydantic2ts
78
+ run : uv build
79
+ - name : Store the distribution
80
+ uses : actions/upload-artifact@v4
81
+ with :
82
+ name : pydantic2ts-dist
83
+ path : dist/
84
+ publish-to-pypi :
85
+ name : Publish pydantic2ts to PyPI
86
+ if : github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
87
+ needs : build
88
+ runs-on : ubuntu-latest
89
+ environment :
90
+ name : pypi
91
+ url : https://pypi.org/p/pydantic-to-typescript
92
+ permissions :
93
+ id-token : write
94
+ steps :
95
+ - name : Download all the dists
96
+ uses : actions/download-artifact@v4
83
97
with :
84
- user : __token__
85
- password : ${{ secrets.pypi_password }}
98
+ name : pydantic2ts-dist
99
+ path : dist/
100
+ - name : Publish distributions to PyPI
101
+ uses : pypa/gh-action-pypi-publish@release/v1
0 commit comments