Skip to content

Bump secondlife-3p/golangci-lint-action from 5 to 9 #336

Bump secondlife-3p/golangci-lint-action from 5 to 9

Bump secondlife-3p/golangci-lint-action from 5 to 9 #336

Workflow file for this run

name: CI
on:
pull_request:
push:
tags: [v*.*.*]
branches: [main]
permissions:
contents: write
jobs:
Build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- uses: actions/setup-go@v5
with:
go-version: ~1.21
- name: Lint
uses: secondlife-3p/golangci-lint-action@v9
with:
args: --timeout=5m
- name: Test
run: |
go mod tidy
go test -v
- name: Choose GoReleaser args
shell: bash
env:
IS_TAG: ${{ startsWith(github.ref, 'refs/tags/v') }}
id: goreleaser-args
run: |
if [[ "$IS_TAG" == "true" ]]
then
echo "Building for a tag: do a fully regular gorelease" >&2
echo "value=" >> $GITHUB_OUTPUT
else
echo "Not building for a tag: do the gorelease in snapshot mode" >&2
echo "value=--snapshot" >> $GITHUB_OUTPUT
fi
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v6
with:
version: v1.21.2
args: release ${{ steps.goreleaser-args.outputs.value }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}