From aeef64a5417f3ed561cbc416212ef6eee0c4135c Mon Sep 17 00:00:00 2001 From: Deralden <121487413+Deralden@users.noreply.github.com> Date: Thu, 11 Apr 2024 16:05:31 +0300 Subject: [PATCH] Workflow for build --- .github/workflows/build.yml | 43 +++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 00000000..53755dd4 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,43 @@ +name: build +on: + push: + branches: [ "master" ] + # pull_request: + # branches: [ "master" ] + workflow_dispatch: + +jobs: + run_build: + runs-on: ubuntu-latest + steps: + + - name: clone repo + uses: actions/checkout@v3 + + - name: download and install + uses: actions/setup-go@v5 + with: + go-version: '${{ vars.VERSION }}' + + - name: protobuff install + run: | + sudo apt update + sudo apt install protobuf-compiler + + - name: go_ins_1 + run: go install google.golang.org/protobuf/cmd/protoc-gen-go@latest + + - name: go_ins_2 + run: go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest + + - name: generate + run: go generate ./... + + - name: check version + run: go version + + - name: check folder + run: ls + + - name: do build + run: go build snetd/main.go