diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 887307d..92c7243 100755 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -10,7 +10,7 @@ jobs: with: go-version: '1.17' - name: Install dependencies - run: make test-deps + run: make deps - name: Unit test run: make test - name: Linting diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0eb0d30..6c85f24 100755 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -10,20 +10,29 @@ jobs: steps: - uses: actions/checkout@master - uses: actions/setup-go@v1 - env: - GO111MODULE: on with: go-version: '1.17' - - run: make test-deps test + - run: make deps test release: name: Release runs-on: ubuntu-latest needs: [ validate ] steps: - - name: Check out code - uses: actions/checkout@master - - name: Perform release - run: make release + - name: Checkout + uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: Set up Go + uses: actions/setup-go@v2 + with: + go-version: '1.17' + - name: Run GoReleaser + uses: goreleaser/goreleaser-action@v2 + with: + # either 'goreleaser' (default) or 'goreleaser-pro' + distribution: goreleaser + version: latest + args: release --rm-dist env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GO111MODULE: on diff --git a/Makefile b/Makefile index bb26ee7..1fad5a4 100644 --- a/Makefile +++ b/Makefile @@ -44,8 +44,8 @@ clean-deps: ./tmp: mkdir -p ./tmp -.PHONY: test-deps -test-deps: ./bin/tparse ./bin/golangci-lint +.PHONY: deps +deps: ./bin/tparse ./bin/golangci-lint go get -v ./... go mod tidy