Skip to content

chore(deps): update github-actions deps #130

chore(deps): update github-actions deps

chore(deps): update github-actions deps #130

Workflow file for this run

---
name: Build and Test
on:
pull_request:
branches: [main]
paths:
- '**/Dockerfile'
- '**/.dockerignore'
- .github/**
- '**.go'
- '**.mod'
- '**.sum'
- config/**
- '**/Makefile*'
- '**/documentation.md'
- .golangci.yaml
- .goreleaser.yaml
push:
branches: [main]
jobs:
lint:
strategy:
matrix:
go: ['1.22']
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go }}
cache: false
- name: Make install-tools
run: make install-tools
- name: Make lint
run: make lint
- name: Check Code Generation
run: |
make generate
git diff -s --exit-code || (echo 'Generated code is out of date. Run make generate and commit the changes' && exit 1)
- name: Check packages are up-to-date
run: |
make tidy
git diff -s --exit-code || (echo 'Packages are out of date. Run make tidy and commit the changes' && exit 1)
build:
name: build
strategy:
matrix:
GOOS: [darwin, linux, windows]
GOARCH: [arm64, amd64, '386']
go: ['1.22']
exclude:
- GOOS: darwin
GOARCH: '386'
- GOOS: darwin
GOARCH: arm
- GOOS: windows
GOARCH: arm
- GOOS: windows
GOARCH: arm64
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go }}
cache: false
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v6
if: steps.cache.outputs.cache-hit != 'true'
with:
distribution: goreleaser-pro
version: latest
args: release --clean --snapshot --split
env:
GGOOS: ${{ matrix.GOOS }}
GGOARCH: ${{ matrix.GOARCH }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}
test:
strategy:
matrix:
go: ['1.22']
name: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go }}
cache: false
- name: Make test
run: make test
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
go-semantic-release:
if: ${{ github.ref == 'refs/heads/main' }}
needs: [lint, build]
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Run go-semantic-release
uses: go-semantic-release/action@v1
with:
github-token: ${{ secrets.SEMANTIC_RELEASE_GH_PAT }}
changelog-generator-opt: emojis=true
allow-initial-development-versions: true