diff --git a/scripts/release-assets.sh b/scripts/release-assets.sh index 5c3a74f..9068af0 100755 --- a/scripts/release-assets.sh +++ b/scripts/release-assets.sh @@ -2,7 +2,7 @@ [[ "$RELEASE_TARGETS" == *"darwin/amd64"* ]] && (echo "Building Darwin AMD64 binary" && GOOS=darwin GOARCH=amd64 $GO build -ldflags "$(bash $DEVGO_SCRIPTS/version-ldflags.sh && echo $BUILD_LDFLAGS)" -o $BUILD_DIR/ $BUILD_PKG && cd $BUILD_DIR && tar zcvf ../darwin_amd64.tar.gz * && rm *) || : [[ "$RELEASE_TARGETS" == *"darwin/arm64"* ]] && (echo "Building Darwin ARM64 binary" && GOOS=darwin GOARCH=arm64 $GO build -ldflags "$(bash $DEVGO_SCRIPTS/version-ldflags.sh && echo $BUILD_LDFLAGS)" -o $BUILD_DIR/ $BUILD_PKG && cd $BUILD_DIR && tar zcvf ../darwin_arm64.tar.gz * && rm *) || : -[[ "$RELEASE_TARGETS" == *"linux/amd64"* ]] && (echo "Building Linux AMD64 binary" && GOOS=linux GOARCH=amd64 $GO build -ldflags "$(bash $DEVGO_SCRIPTS/version-ldflags.sh && echo $BUILD_LDFLAGS)" -o $BUILD_DIR/ $BUILD_PKG && cd $BUILD_DIR && tar zcvf ../linux_amd64.tar.gz * && rm *) || : +[[ "$RELEASE_TARGETS" == *"linux/amd64"* ]] && (echo "Building Linux AMD64 binary" && GOOS=linux GOARCH=amd64 $GO build -ldflags "$(bash $DEVGO_SCRIPTS/version-ldflags.sh && echo $BUILD_LDFLAGS)" -o $BUILD_DIR/ $BUILD_PKG && cd $BUILD_DIR && echo "git hash-object: $(git hash-object *)" && tar zcvf ../linux_amd64.tar.gz * && rm *) || : [[ "$RELEASE_TARGETS" == *"linux/dbg-amd64"* ]] && (echo "Building Debug Linux AMD64 binary" && GOOS=linux GOARCH=amd64 CGO_ENABLED=1 $GO build -race -ldflags "$(bash $DEVGO_SCRIPTS/version-ldflags.sh && echo $BUILD_LDFLAGS)" -o $BUILD_DIR/ $BUILD_PKG && cd $BUILD_DIR && tar zcvf ../linux_amd64_dbg.tar.gz * && rm *) || : [[ "$RELEASE_TARGETS" == *"linux/arm64"* ]] && (echo "Building Linux ARM64 binary" && GOOS=linux GOARCH=arm64 $GO build -ldflags "$(bash $DEVGO_SCRIPTS/version-ldflags.sh && echo $BUILD_LDFLAGS)" -o $BUILD_DIR/ $BUILD_PKG && cd $BUILD_DIR && tar zcvf ../linux_arm64.tar.gz * && rm *) || : [[ "$RELEASE_TARGETS" == *"linux/arm32"* ]] && (echo "Building Linux ARM binary" && GOOS=linux GOARCH=arm $GO build -ldflags "$(bash $DEVGO_SCRIPTS/version-ldflags.sh && echo $BUILD_LDFLAGS)" -o $BUILD_DIR/ $BUILD_PKG && cd $BUILD_DIR && tar zcvf ../linux_arm.tar.gz * && rm *) || : diff --git a/templates/github/workflows/release-assets.yml b/templates/github/workflows/release-assets.yml index b7b3f18..421be7e 100644 --- a/templates/github/workflows/release-assets.yml +++ b/templates/github/workflows/release-assets.yml @@ -42,7 +42,7 @@ jobs: asset_name: linux_amd64.tar.gz asset_content_type: application/tar+gzip - name: Upload linux_amd64_dbg.tar.gz - if: hashFiles('linux_amd64.tar.gz') != '' + if: hashFiles('linux_amd64_dbg.tar.gz') != '' uses: actions/upload-release-asset@v1 with: upload_url: ${{ github.event.release.upload_url }}