Skip to content

Commit

Permalink
chore: update build workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
rayanebel committed Jan 8, 2025
1 parent aba0919 commit 2e41964
Showing 1 changed file with 16 additions and 5 deletions.
21 changes: 16 additions & 5 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,22 @@ jobs:
mkdir -p dist
ARCH_NAME=${{ matrix.arch }}
OUTPUT_FILE="cardano-validator-watcher_${{ github.ref_name }}_${{ steps.export-variables.outputs.os_name }}_${ARCH_NAME}"
CGO_ENABLED=1 \
GOOS=${{ steps.export-variables.outputs.os_name }} \
GOARCH=$ARCH_NAME \
go build -ldflags="-s -w" -o dist/${OUTPUT_FILE} cmd/watcher/main.go
tar -czvf dist/${OUTPUT_FILE}.tar.gz -C dist/ ${OUTPUT_FILE}
if [ "$OS_NAME" = "linux" ] && [ "$ARCH_NAME" = "arm" ]; then
echo "Building for Linux ARM with specific toolchain"
CC=arm-linux-gnueabihf-gcc \
CXX=arm-linux-gnueabihf-g++ \
CGO_ENABLED=1 \
GOOS=linux \
GOARCH=arm \
GOARM=7 \
go build -v -o dist/${OUTPUT_FILE} cmd/watcher/main.go
else
echo "Building for $OS_NAME $ARCH_NAME"
CGO_ENABLED=1 \
GOOS=$OS_NAME \
GOARCH=$ARCH_NAME \
go build -ldflags="-s -w" -o dist/${OUTPUT_FILE} cmd/watcher/main.go
fi
- name: List dist directory
run: ls -la dist/
Expand Down

0 comments on commit 2e41964

Please sign in to comment.