From c0f9ae75f01b18d3034323bb35dbddb0198a0594 Mon Sep 17 00:00:00 2001 From: Carlos Alexandro Becker Date: Wed, 5 Jun 2024 11:14:04 -0300 Subject: [PATCH] ci: fix release workflow --- .github/workflows/build.yml | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0620f50..5c8266a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -3,50 +3,43 @@ name: build on: push: branches: - - 'main' + - "main" tags: - - 'v*' + - "v*" pull_request: jobs: build: runs-on: ubuntu-latest steps: - - - name: Checkout + - name: Checkout uses: actions/checkout@v4 with: fetch-depth: 0 - - - name: Set up Go + - name: Set up Go uses: actions/setup-go@v5 with: go-version: 1.18 - - - name: Cache Go modules + - name: Cache Go modules uses: actions/cache@v4 with: path: ~/go/pkg/mod key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} restore-keys: | ${{ runner.os }}-go- - - - name: CI + - name: CI run: make setup ci - - - name: Upload coverage + - name: Upload coverage uses: codecov/codecov-action@v4 with: token: ${{ secrets.CODECOV_TOKEN }} file: ./coverage.txt - - - name: Run GoReleaser + - name: Run GoReleaser uses: goreleaser/goreleaser-action@v6 if: success() && startsWith(github.ref, 'refs/tags/') with: version: latest distribution: goreleaser-pro - args: release --rm-dist env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}