From c2a46070aa8128fdaa09904aef43f1917af42c1c Mon Sep 17 00:00:00 2001 From: Justin Ma Date: Fri, 24 Nov 2023 07:47:59 +0800 Subject: [PATCH] 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 --- .github/workflows/release-pkg.nu | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release-pkg.nu b/.github/workflows/release-pkg.nu index 7c9a9b594..fb44194fa 100755 --- a/.github/workflows/release-pkg.nu +++ b/.github/workflows/release-pkg.nu @@ -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