mirror of
https://github.com/zu1k/nali.git
synced 2025-02-13 15:52:41 +08:00
update go.yml
This commit is contained in:
parent
b6e67af5bc
commit
0b60106863
23
.github/workflows/go.yml
vendored
23
.github/workflows/go.yml
vendored
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user