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 41dc95d commit db6c2f3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .github/workflows/release-pkg.nu
Original file line number Diff line number Diff line change
Expand Up @@ -155,13 +155,15 @@ if ($ver | str trim | is-empty) {
cd $dist; print $'(char nl)Creating release archive...'; hr-line
if $os in [$USE_UBUNTU, 'macos-latest'] {

print 'Files in Current directory:'
print (ls -l)
let files = (ls | get name)
let dest = if $env.RELEASE_TYPE == 'full' { $'($bin)-($version)-($FULL_NAME)' } else { $'($bin)-($version)-($target)' }
let archive = $'($dist)/($dest).tar.gz'

mkdir $dest
$files | each {|it|
if not ($it | path exists) {
if not ($'(pwd)/($it)' | path exists) {
print $'(ansi r)($it) not exists, abort...(ansi reset)'
exit 1
}
Expand Down

0 comments on commit db6c2f3

Please sign in to comment.