Skip to content

Commit

Permalink
debug
Browse files Browse the repository at this point in the history
  • Loading branch information
rayanebel committed Jan 9, 2025
1 parent 628c4c7 commit 1f9f32a
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ jobs:
- arm64
runs-on: ${{ matrix.os }}
env:
BINARY_DIRECTORY: $GITHUB_ENV
ARCH_NAME: ${{ matrix.arch }}
steps:
- name: Checkout code
Expand Down Expand Up @@ -67,9 +66,9 @@ jobs:
- name: Build ${{matrix.os}}-${{matrix.arch}} binary
id: build
run: |
OUTPUT_NAME="$BINARY_NAME_${{ github.ref_name }}_${OS_NAME}_${ARCH_NAME}"
OUTPUT_DIR=dist/$OUTPUT_NAME
ARCHIVE_NAME="$OUTPUT_NAME.tar.gz"
OUTPUT_NAME="${{ env.BINARY_NAME }}_${{ github.ref_name }}_${OS_NAME}_${ARCH_NAME}"
OUTPUT_DIR=dist/${OUTPUT_NAME}
ARCHIVE_NAME="${OUTPUT_NAME}.tar.gz"
# debug
echo "OUTPUT_NAME=${OUTPUT_NAME}"
Expand All @@ -81,22 +80,22 @@ jobs:
echo "output_dir=${OUTPUT_DIR}" >> $GITHUB_OUTPUT
mkdir -p ${OUTPUT_DIR}
if [ "$OS_NAME" = "linux" ] && [ "$ARCH_NAME" = "arm64" ]; then
if [ "${OS_NAME}" = "linux" ] && [ "${ARCH_NAME}" = "arm64" ]; then
export CC=aarch64-linux-gnu-gcc
export CXX=aarch64-linux-gnu-g++
fi
CGO_ENABLED=1 GOOS=$OS_NAME GOARCH=$ARCH_NAME \
go build -ldflags="-s -w" -o ${OUTPUT_DIR}/${BINARY_NAME} cmd/watcher/main.go
tar -czvf ${OUTPUT_DIR}/${ARCHIVE_NAME} -C ${OUTPUT_DIR} ${BINARY_NAME}
go build -ldflags="-s -w" -o ${OUTPUT_DIR}/${{ env.BINARY_NAME }} cmd/watcher/main.go
tar -czvf ${OUTPUT_DIR}/${ARCHIVE_NAME} -C ${OUTPUT_DIR} ${{ env.BINARY_NAME }}
env:
OS_NAME: ${{ steps.export-variables.outputs.os_name }}

- name: Upload binaries to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: "${{env.DIRECTORY}}/*.tar.gz"
file: "${{ env.DIRECTORY }}/*.tar.gz"
tag: ${{ github.ref_name }}
file_glob: true
env:
Expand Down

0 comments on commit 1f9f32a

Please sign in to comment.