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 b7c88f6
Showing 1 changed file with 8 additions and 12 deletions.
20 changes: 8 additions & 12 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,22 @@ 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@v2
- uses: actions/setup-go@v2
with:
go-version: '1.21'
- name: Check out code
uses: actions/checkout@v2
- name: Install dependencies
run: go mod download
- name: Run golangci-lint
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@v2
- uses: actions/setup-go@v2
with:
go-version: '1.21'
- name: Create GitHub Release
Expand Down

0 comments on commit b7c88f6

Please sign in to comment.