This repository has been archived by the owner on Oct 9, 2024. It is now read-only.
BREAKING CHANGES: rename LOG_ADDITIONAL_FIELD to LOG_EXTRA_FIELD #39
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: build | |
on: | |
push: | |
tags: | |
- "v*" | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Determine Go version from go.mod | |
run: echo "GO_VERSION=$(grep 'go 1.' go.mod | cut -d ' ' -f 2)" >> $GITHUB_ENV | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: ${{ env.GO_VERSION }} | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Cache Go modules | |
uses: actions/cache@v4 | |
with: | |
path: ~/go/pkg/mod | |
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | |
restore-keys: | | |
${{ runner.os }}-go- | |
- name: Log in to GitHub Container registry | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Run unit tests | |
run: go test ./... -v | |
- name: Run GoReleaser | |
uses: goreleaser/goreleaser-action@v6 | |
if: success() && startsWith(github.ref, 'refs/tags/') | |
with: | |
version: latest | |
args: release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |