Skip to content

Commit 6110d33

Browse files
committed
Use the same release job as Pydantic’s GitHub Actions
1 parent 933f800 commit 6110d33

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

.github/workflows/ci.yml

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
- name: set up uv
1919
uses: astral-sh/setup-uv@v5
2020
with:
21-
python-version: '3.10'
21+
python-version: '3.12'
2222

2323
- name: Install dependencies
2424
# Installing pip is required for the pre-commit action:
@@ -93,9 +93,8 @@ jobs:
9393
jobs: ${{ toJSON(needs) }}
9494

9595
release:
96-
name: Release
9796
needs: [check]
98-
if: "success() && startsWith(github.ref, 'refs/tags/')"
97+
if: needs.check.outputs.result == 'success' && startsWith(github.ref, 'refs/tags/')
9998
runs-on: ubuntu-latest
10099
environment: release
101100

@@ -105,18 +104,21 @@ jobs:
105104
steps:
106105
- uses: actions/checkout@v4
107106

108-
- name: set up uv
109-
uses: astral-sh/setup-uv@v5
107+
- uses: actions/setup-python@v5
110108
with:
111-
python-version: '3.10'
109+
python-version: '3.12'
112110

113-
- name: check GITHUB_REF matches package version
111+
- name: Install 'build' library
112+
run: pip install -U build
113+
114+
- name: Check version
115+
id: check-tag
114116
uses: samuelcolvin/[email protected]
115117
with:
116118
version_file_path: pydantic_settings/version.py
117119

118-
- name: build
119-
run: uv build
120+
- name: Build library
121+
run: python -m build
120122

121123
- name: Upload package to PyPI
122124
uses: pypa/gh-action-pypi-publish@release/v1

0 commit comments

Comments
 (0)