Exit the release job if creating binary package failed (#11145)

Try to exit the job if creating binary package failed, related issue:
https://github.com/nushell/nightly/issues/15
This commit is contained in:
Justin Ma 2023-11-24 07:47:59 +08:00 committed by GitHub
parent 57808ca7cc
commit c2a46070aa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -160,7 +160,13 @@ if $os in [$USE_UBUNTU, 'macos-latest'] {
let archive = $'($dist)/($dest).tar.gz'
mkdir $dest
$files | each {|it| mv $it $dest } | ignore
$files | each {|it|
if not ($it | path exists) {
print $'(ansi r)($it) not exists, abort...(ansi reset)'
exit 1
}
mv $it $dest
} | ignore
print $'(char nl)(ansi g)Archive contents:(ansi reset)'; hr-line; ls $dest