Skip to content

ci: update golangci-lint action #455

ci: update golangci-lint action

ci: update golangci-lint action #455

Workflow file for this run

name: CI
on:
push:
branches:
- '**'
pull_request:
branches:
- '**'
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '1.23'
- uses: golangci/golangci-lint-action@v6
with:
args: --timeout=5m
build:
name: Build and Run
runs-on: ${{ matrix.os }}
needs: lint
strategy:
fail-fast: true
matrix:
os: [macos-latest, windows-latest, ubuntu-latest]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '1.23'
- run: go build ./cmd/semantic-release/
env:
CGO_ENABLED: 0
- run: go test -v ./...
- run: ./semantic-release --dry --allow-no-changes --no-ci
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
shell: bash
release:
name: Release
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '1.23'
- run: go build ./cmd/semantic-release/
- uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: docker/login-action@v1
with:
registry: registry.gitlab.com
username: ${{ secrets.GITLAB_REGISTRY_USER }}
password: ${{ secrets.GITLAB_REGISTRY_TOKEN }}
- uses: go-semantic-release/action@v1
with:
bin: ./semantic-release
hooks: goreleaser,npm-binary-releaser
prerelease: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}