From 1665e5bbc7f1958f082f28f71d2616196a04ef8d Mon Sep 17 00:00:00 2001 From: Sepehr Date: Wed, 1 May 2024 22:13:20 +0200 Subject: [PATCH] Update workflow --- .github/workflows/go.yml | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 45c051a..80114cb 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -2,29 +2,26 @@ name: Go CI on: push: - branches: - - main tags: - '*' + branches: + - main pull_request: branches: - main jobs: test: - name: Test and Lint runs-on: ubuntu-latest steps: - - name: Set up Go - uses: actions/setup-go@v2 + - uses: actions/checkout@v4 + - uses: actions/setup-go@v4 with: go-version: '1.21' - - name: Check out code - uses: actions/checkout@v2 - name: Install dependencies run: go mod download - name: Run golangci-lint - uses: golangci/golangci-lint-action@v2 + uses: golangci/golangci-lint-action@v4 with: version: latest args: --config=.golangci.yml @@ -34,15 +31,14 @@ jobs: uses: codecov/codecov-action@v4.0.1 with: token: ${{ secrets.CODECOV_TOKEN }} + release: needs: test runs-on: ubuntu-latest - if: ${{ startsWith(github.ref, 'refs/tags/') }} + if: startsWith(github.ref, 'refs/tags/') steps: - - name: Check out code - uses: actions/checkout@v2 - - name: Set up Go - uses: actions/setup-go@v2 + - uses: actions/checkout@v4 + - uses: actions/setup-go@v4 with: go-version: '1.21' - name: Create GitHub Release