diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..3012db6 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,23 @@ +name: release + +on: + push: + tags: ['v*'] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: checkout + uses: actions/checkout@v2 + - name: install go + uses: actions/setup-go@v2 + with: + go-version: 1.16 + - name: release + uses: goreleaser/goreleaser-action@v2 + with: + version: latest + args: release --rm-dist + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/go.yml b/.github/workflows/test.yml similarity index 62% rename from .github/workflows/go.yml rename to .github/workflows/test.yml index 28301bb..78c2b70 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/test.yml @@ -1,4 +1,4 @@ -name: Go +name: test on: push: @@ -7,19 +7,16 @@ on: branches: [ master ] jobs: - build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - - name: Set up Go + - name: checkout + uses: actions/checkout@v2 + - name: install go uses: actions/setup-go@v2 with: - go-version: 1.15 - - - name: Build + go-version: 1.16 + - name: build run: go build -v ./... - - - name: Test + - name: test run: go test -v -race ./...