@@ -24,16 +24,27 @@ jobs:
2424 models : none # only enable unit tests
2525 use_public_wheel : true
2626
27+ approve :
28+ name : Approve Release
29+ if : ${{ inputs.target == 'prod' }}
30+ needs : [test_public_wheel]
31+ runs-on : ubuntu-latest
32+ timeout-minutes : 30
33+ environment : release
34+ steps :
35+ - run : echo "Release approved"
36+
2737 release_code :
2838 name : Release code to Repository
2939 secrets : inherit
30- needs : [test_public_wheel ]
40+ needs : [approve ]
3141 uses : ./.github/workflows/release_code.yaml
3242
3343 release_pypi :
3444 name : Release wheel to ${{ inputs.target == 'prod' && 'PyPi' || 'test PyPi' }}
3545 secrets : inherit
36- needs : [test_public_wheel]
46+ needs : [approve]
47+ if : ${{ !cancelled() && (needs.approve.result == 'success' || needs.approve.result == 'skipped') }}
3748 uses : ./.github/workflows/release_pypi.yaml
3849 with :
3950 target : ${{ inputs.target }}
@@ -42,21 +53,21 @@ jobs:
4253 name : Release Hugging Face Model Cards
4354 if : ${{ inputs.target == 'prod' }}
4455 secrets : inherit
45- needs : [test_public_wheel ]
56+ needs : [approve ]
4657 uses : ./.github/workflows/release_huggingface.yaml
4758
4859 release_assets :
4960 name : Release Assets
5061 if : ${{ inputs.target == 'prod' }}
5162 secrets : inherit
52- needs : [test_public_wheel ]
63+ needs : [approve ]
5364 uses : ./.github/workflows/release_assets.yaml
5465
5566 sync_public_website :
5667 name : Sync Public Website & Create Public Website PR
5768 secrets : inherit
5869 if : ${{ inputs.target == 'prod' }}
59- needs : [test_public_wheel ]
70+ needs : [approve ]
6071 uses : ./.github/workflows/release_website.yml
6172 with :
6273 source_branch_name : ${{ github.ref }}
0 commit comments