Skip to content

Commit

Permalink
Update workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
sepisoltani committed May 1, 2024
1 parent c28596c commit 1665e5b
Showing 1 changed file with 9 additions and 13 deletions.
22 changes: 9 additions & 13 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -34,15 +31,14 @@ jobs:
uses: codecov/[email protected]
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
Expand Down

0 comments on commit 1665e5b

Please sign in to comment.