feat: add workflows

This commit is contained in:
Zhiqiang Li
2023-03-30 17:11:23 +08:00
parent bd2cf7bf24
commit b368fe261a
2 changed files with 29 additions and 0 deletions

22
.github/workflows/build.yml vendored Normal file
View File

@@ -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

7
Makefile Normal file
View File

@@ -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