From 52bc10cd1841106b21e1460e75abd44b731b99a7 Mon Sep 17 00:00:00 2001 From: Daniel Heinsen Date: Sun, 1 Sep 2024 12:59:33 -0700 Subject: [PATCH] Actions (#42) * Adding workflow for building * Adding golang build * Not running the produced bin, just checking for existence --- .github/workflows/build.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 596bc6f..0d00b4a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -26,3 +26,26 @@ jobs: - name: Run TypeScript compiler with noEmit run: npx tsc --noEmit --strict working-directory: ./ui/apeman-ui + + go-build: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Set up Go + uses: actions/setup-go@v4 + with: + go-version: "1.20" # Replace with the Go version you want to use + + - name: Download Go modules + run: go mod download + working-directory: ./cmd + + - name: Build Go binary + run: go build -ldflags '-s -w' -o main ./api/main.go + working-directory: ./cmd + + - name: Check if Go binary exists + run: test -f ./main + working-directory: ./cmd