From 0b601068634a17a0b58948da8ee34487340ea868 Mon Sep 17 00:00:00 2001 From: zu1k Date: Fri, 17 Jul 2020 11:49:49 +0800 Subject: [PATCH] update go.yml --- .github/workflows/go.yml | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 18ae7e9..f015e29 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -7,32 +7,32 @@ jobs: runs-on: ubuntu-latest steps: - name: Setup Go - uses: actions/setup-go@v1 + uses: actions/setup-go@v2 with: - go-version: 1.14 + go-version: 1.14.x - name: Check out code into the Go module directory - uses: actions/checkout@v1 + uses: actions/checkout@v2 - name: Cache go module - uses: actions/cache@v1 + uses: actions/cache@v2 with: path: ~/go/pkg/mod key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} restore-keys: | ${{ runner.os }}-go- + - name: Get dependencies and run test + run: | + go test ./... + - name: Build + if: startsWith(github.ref, 'refs/tags/') env: NAME: nali BINDIR: bin run: make -j releases - - uses: actions/upload-artifact@v1 - with: - name: build - path: bin - - name: Upload Release uses: softprops/action-gh-release@v1 if: startsWith(github.ref, 'refs/tags/') @@ -42,3 +42,8 @@ jobs: files: bin/* draft: true prerelease: true + + - uses: actions/upload-artifact@v1 + with: + name: build + path: bin