From 94289559a7d1456a97de7130f59dc5d715f75088 Mon Sep 17 00:00:00 2001 From: Rob van Oostenrijk Date: Mon, 20 Nov 2023 19:40:45 +0400 Subject: [PATCH] Added workflow to build FreeBSD binaries Signed-off-by: Rob van Oostenrijk --- .github/workflows/main.yml | 40 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 00000000..600621e9 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,40 @@ +name: Build & Upload Artifacts + +on: + push: + tags: + - '*' +jobs: + build-container-and-deploy: + runs-on: ubuntu-latest + name: Build cloudflared for FreeBSD + env: + GOOS: freebsd + if: github.event_name == 'push' + steps: + - name: Install Go + uses: actions/setup-go@v3 + with: + go-version: 1.20.x + - name: Checkout code + uses: actions/checkout@v3 + - name: Build + shell: bash + run: | + sed -i "s/\(LDFLAGS.*\)'$/\1 -s -w'/" Makefile + + for BUILD in amd64,amd64 arm64,aarch64 arm,armv7 386,i386; do + export GOARCH=${BUILD%,*} + export PLATFORM=${BUILD#*,} + + make cloudflared + tar -cvJf cloudflared-${PLATFORM}.tar.xz cloudflared + done + - name: Release + uses: softprops/action-gh-release@v1 + with: + files: | + cloudflared-aarch64.tar.xz + cloudflared-amd64.tar.xz + cloudflared-armv7.tar.xz + cloudflared-i386.tar.xz