Skip to content

Commit

Permalink
Exit the release job if creating binary package failed
Browse files Browse the repository at this point in the history
  • Loading branch information
hustcer committed Nov 24, 2023
1 parent 3b53393 commit b760b8e
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions .github/workflows/release-pkg.nu
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ print $'(char nl)Copying release files...'; hr-line
> register ./nu_plugin_query" | save $'($dist)/README.txt' -f
[LICENSE $executable] | each {|it| cp -rv $it $dist } | flatten
# Sleep a few seconds to make sure the cp process finished successfully
# sleep 3sec
sleep 3sec

print $'(char nl)Check binary release version detail:'; hr-line
let ver = if $os == 'windows-latest' {
Expand All @@ -164,11 +164,7 @@ if $os in [$USE_UBUNTU, 'macos-latest'] {
let archive = $'($dist)/($dest).tar.gz'

mkdir $dest
try {
$files | each {|it| mv $it $dest } | ignore
} catch {
print $'(ansi r)Error creating release archive (ansi reset)'; exit 1
}
$files | each {|it| mv $it $dest } | ignore

print $'(char nl)(ansi g)Archive contents:(ansi reset)'; hr-line; ls $dest

Expand Down

0 comments on commit b760b8e

Please sign in to comment.