4141 uses : ./.github/workflows/ci.yml
4242
4343 build :
44+ outputs :
45+ package-artifact-id : ${{ steps.upload-package.outputs.artifact-id }}
46+ bundle-artifact-id : ${{ steps.upload-acceptance.outputs.artifact-id }}
4447 needs : [validate, check]
4548 runs-on : ubuntu-latest
4649 timeout-minutes : 15
@@ -58,20 +61,31 @@ jobs:
5861 - name : Check package identity and release version
5962 env :
6063 RELEASE_TAG : ${{ github.event.release.tag_name }}
61- run : bash scripts/check_package.sh "${RELEASE_TAG#v}"
64+ run : |
65+ python -c 'import os,tomllib; p=tomllib.load(open("pyproject.toml","rb"))["project"]; assert p["name"]=="volcano-sdk-python" and "v"+p["version"]==os.environ["RELEASE_TAG"]'
6266 - uses : actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
67+ id : upload-package
6368 with :
6469 name : release-package
6570 path : dist/*
6671 if-no-files-found : error
6772 - uses : actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
73+ id : upload-acceptance
6874 with :
6975 name : acceptance-tests
7076 path : acceptance-output/sdk-acceptance.tar.gz
7177 if-no-files-found : error
7278
73- attest :
79+ acceptance-check :
7480 needs : build
81+ uses : ./.github/workflows/verify-acceptance.yml
82+ with :
83+ package-artifact-id : ${{ needs.build.outputs.package-artifact-id }}
84+ bundle-artifact-id : ${{ needs.build.outputs.bundle-artifact-id }}
85+ release-version : ${{ github.event.release.tag_name }}
86+
87+ attest :
88+ needs : [build, acceptance-check]
7589 runs-on : ubuntu-latest
7690 timeout-minutes : 5
7791 permissions :
@@ -81,11 +95,13 @@ jobs:
8195 steps :
8296 - uses : actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
8397 with :
84- name : release-package
98+ artifact-ids : ${{ needs.build.outputs.package-artifact-id }}
99+ merge-multiple : true
85100 path : release
86101 - uses : actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
87102 with :
88- name : acceptance-tests
103+ artifact-ids : ${{ needs.build.outputs.bundle-artifact-id }}
104+ merge-multiple : true
89105 path : release
90106 - uses : actions/attest@1e69f48acb82d1966a394da916b4c1698aa569d6 # v4
91107 with :
@@ -121,21 +137,23 @@ jobs:
121137 # Publishing receives checked artifacts without executing SDK source.
122138 - uses : actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
123139 with :
124- name : release-package
140+ artifact-ids : ${{ needs.build.outputs.package-artifact-id }}
141+ merge-multiple : true
125142 path : dist
126143 - name : Publish distributions to PyPI
127144 uses : pypa/gh-action-pypi-publish@dc37677b2e1c63e2034f94d8a5b11f265b73ba33 # v1.14.2
128145
129146 registry-smoke :
130- needs : publish
147+ needs : [ publish, build]
131148 runs-on : ubuntu-latest
132149 timeout-minutes : 15
133150 permissions :
134151 contents : read
135152 steps :
136153 - uses : actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
137154 with :
138- name : acceptance-tests
155+ artifact-ids : ${{ needs.build.outputs.bundle-artifact-id }}
156+ merge-multiple : true
139157 path : acceptance-output
140158 - uses : actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
141159 with :
0 commit comments