File tree Expand file tree Collapse file tree 1 file changed +1
-28
lines changed
Expand file tree Collapse file tree 1 file changed +1
-28
lines changed Original file line number Diff line number Diff line change 66 pull_request :
77 branches : [main]
88 workflow_dispatch :
9- inputs :
10- tag :
11- description : ' Git tag to build and publish (e.g. v3.1.6)'
12- required : true
13- type : string
149
1510permissions :
1611 contents : read
@@ -21,26 +16,7 @@ concurrency:
2116
2217jobs :
2318
24- validate_tag :
25- if : github.event_name == 'workflow_dispatch'
26- runs-on : ubuntu-latest
27- steps :
28- - name : Validate tag format
29- run : |
30- if [[ ! "${{ inputs.tag }}" =~ ^v[0-9]+\.[0-9]+\.[0-9]+([a-z]+[0-9]*)?$ ]]; then
31- echo "::error::Invalid tag format '${{ inputs.tag }}'. Expected format: v1.2.3, v1.2.3a1, v1.2.3rc1"
32- exit 1
33- fi
34- - name : Verify tag exists
35- run : |
36- git ls-remote --tags "${{ github.server_url }}/${{ github.repository }}" "${{ inputs.tag }}" | grep -q "${{ inputs.tag }}" || {
37- echo "::error::Tag '${{ inputs.tag }}' does not exist in the repository"
38- exit 1
39- }
40-
4119 build_artifacts :
42- needs : [validate_tag]
43- if : always() && (needs.validate_tag.result == 'success' || needs.validate_tag.result == 'skipped')
4420 name : Build wheel on ubuntu-latest
4521 runs-on : ubuntu-latest
4622 strategy :
4925 steps :
5026 - uses : actions/checkout@v6
5127 with :
52- ref : ${{ inputs.tag || github.ref }}
5328 submodules : true
5429 fetch-depth : 0
5530
8661 upload_pypi :
8762 needs : [build_artifacts, test_dist_pypi]
8863 runs-on : ubuntu-latest
89- if : >-
90- (github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v'))
91- || (github.event_name == 'workflow_dispatch' && startsWith(inputs.tag, 'v'))
64+ if : github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v')
9265 environment :
9366 name : releases
9467 url : https://pypi.org/p/zarr
You can’t perform that action at this time.
0 commit comments