diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..90d8dff --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,22 @@ +name: Build + +on: + push: + branches: [ "master" ] + pull_request: + branches: [ "master" ] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + fetch-depth: '0' + - name: Set up Go + uses: actions/setup-go@v3 + with: + go-version: 1.19 + - name: Build + run: make build \ No newline at end of file diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..f5b3fcb --- /dev/null +++ b/Makefile @@ -0,0 +1,7 @@ +LDFLAGS := -s -w +BIN_NAME := "azure-openai-proxy" + +build: + @env CGO_ENABLED=0 go build -trimpath -ldflags "$(LDFLAGS)" -o bin/$(BIN_NAME) ./cmd + +.PHONY: build \ No newline at end of file