Skip to content

Refresh code

Refresh code #364

Workflow file for this run

name: Go
on:
push:
branches: [ master, develop ]
tags:
- '*'
pull_request:
branches: '*'
jobs:
build:
name: Build, Lint and Test
strategy:
matrix:
os: [ ubuntu, windows, macos ]
runs-on: ${{ matrix.os }}-latest
steps:
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.21
id: go
- name: Install Taskfile
uses: arduino/setup-task@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
version: '3.4.2'
- name: Check out code into the Go module directory
uses: actions/checkout@v2
- name: Lint
uses: golangci/golangci-lint-action@v2
with:
version: v1.55.0
args: -v --fix --timeout 10m
- name: Build
run: task build:ci
- name: Test
run: task test:ci
- name: Upload coverage profile
uses: codecov/codecov-action@v1
with:
file: ./coverage.xml
name: fisherman
fail_ci_if_error: false
- name: Upload build artifact
uses: actions/upload-artifact@v2
with:
name: ${{ runner.os }}
path: |
fisherman
fisherman.exe
lint-docs:
name: Lint markdown documentation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: DavidAnson/markdownlint-cli2-action@v4
with:
globs: "**/*.md"
realise:
name: Realise application
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/')
needs: [ build, lint-docs ]
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.21
- name: Realise application with GoReleaser
uses: goreleaser/goreleaser-action@v2
with:
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}