From 4f12dd366d676b767e0487e5b999794dbc073605 Mon Sep 17 00:00:00 2001 From: qydysky <32743305+qydysky@users.noreply.github.com> Date: Sun, 4 Oct 2020 18:15:17 +0800 Subject: [PATCH] Create go.yml --- .github/workflows/go.yml | 42 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 .github/workflows/go.yml diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml new file mode 100644 index 0000000..20e2e5d --- /dev/null +++ b/.github/workflows/go.yml @@ -0,0 +1,42 @@ +name: Go + +on: + release: + types: [released,prereleased] + branches: + - master + +jobs: + + build: + name: Build + runs-on: ubuntu-latest + steps: + + - name: Set up Go 1.x + uses: actions/setup-go@v2 + with: + go-version: ^1.15.2 + id: go + + - name: Check out code into the Go module directory + uses: actions/checkout@v2 + + - name: Get dependencies + run: | + go get -v -t -d ./... + if [ -f Gopkg.toml ]; then + curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh + dep ensure + fi + + - name: Build + run: go build -v . + + - name: Upload a Build Artifact + uses: actions/upload-artifact@v2.2.0 + with: + # Artifact name + # A file, directory or wildcard pattern that describes what to upload + path: ./ + # The desired behavior if no files are found using the provided path. -- 2.39.2