66name : CI
77
88on :
9- push :
10- branches :
11- - main
12- - master
13- tags :
14- - ' *'
15- pull_request :
16- workflow_dispatch :
9+ release :
10+ types : [released]
1711
1812permissions :
1913 contents : read
4135 - uses : actions/setup-python@v6
4236 with :
4337 python-version : 3.x
38+ - name : Setting correct version
39+ run : |
40+ python ./scripts/version_bumper.py "${{ github.ref_name }}"
4441 - name : Build wheels
4542 uses : PyO3/maturin-action@v1
4643 with :
7471 - uses : actions/setup-python@v6
7572 with :
7673 python-version : 3.x
74+ - name : Setting correct version
75+ run : |
76+ python ./scripts/version_bumper.py "${{ github.ref_name }}"
7777 - name : Build wheels
7878 uses : PyO3/maturin-action@v1
7979 with :
@@ -110,6 +110,9 @@ jobs:
110110 with :
111111 python-version : 3.13
112112 architecture : ${{ matrix.platform.python_arch }}
113+ - name : Setting correct version
114+ run : |
115+ python ./scripts/version_bumper.py "${{ github.ref_name }}"
113116 - name : Build wheels
114117 uses : PyO3/maturin-action@v1
115118 with :
@@ -136,6 +139,9 @@ jobs:
136139 - uses : actions/setup-python@v6
137140 with :
138141 python-version : 3.x
142+ - name : Setting correct version
143+ run : |
144+ python ./scripts/version_bumper.py "${{ github.ref_name }}"
139145 - name : Build wheels
140146 uses : PyO3/maturin-action@v1
141147 with :
@@ -152,6 +158,12 @@ jobs:
152158 runs-on : ubuntu-latest
153159 steps :
154160 - uses : actions/checkout@v6
161+ - uses : actions/setup-python@v6
162+ with :
163+ python-version : 3.x
164+ - name : Setting correct version
165+ run : |
166+ python ./scripts/version_bumper.py "${{ github.ref_name }}"
155167 - name : Build sdist
156168 uses : PyO3/maturin-action@v1
157169 with :
@@ -166,7 +178,6 @@ jobs:
166178 release :
167179 name : Release
168180 runs-on : ubuntu-latest
169- if : ${{ startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch' }}
170181 needs : [linux, musllinux, windows, macos, sdist]
171182 permissions :
172183 # Use to sign the release artifacts
@@ -180,12 +191,10 @@ jobs:
180191 - name : Generate artifact attestation
181192 uses : actions/attest-build-provenance@v3
182193 with :
183- subject-path : ' wheels-*/*'
194+ subject-path : " wheels-*/*"
184195 - name : Install uv
185- if : ${{ startsWith(github.ref, 'refs/tags/') }}
186196 uses : astral-sh/setup-uv@v7
187197 - name : Publish to PyPI
188- if : ${{ startsWith(github.ref, 'refs/tags/') }}
189198 run : uv publish 'wheels-*/*'
190199 env :
191- UV_PUBLISH_TOKEN : ${{ secrets.PYPI_API_TOKEN }}
200+ UV_PUBLISH_TOKEN : ${{ secrets.PYPI_TOKEN }}
0 commit comments