Skip to content

feature(docker): Docker image and goreleaser #480

feature(docker): Docker image and goreleaser

feature(docker): Docker image and goreleaser #480

Workflow file for this run

name: Go
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
workflow_dispatch:
jobs:
build:
name: Lint Test and Build
runs-on: ubuntu-latest
steps:
- name:
uses: actions/checkout@v4
- name: Pull tags and refs
run: git fetch --prune --unshallow
- name: Check if version is updated
run: |
export ExpectedVersion=$(git describe --tags --abbrev=0)
export DefinedVersion=$(cat cmd/gemini/Version)
if [ "$ExpectedVersion" != "$DefinedVersion" ]; then
echo "Expect to have '$ExpectedVersion', but got '$DefinedVersion'"
exit 1
fi
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: '1.23'
- name: Linting
uses: reviewdog/action-golangci-lint@v2
with:
cache: true
fail_on_error: true
- name: Set up gotestfmt
uses: GoTestTools/gotestfmt-action@v2
with:
repo: gotestfmt
version: v2.2.0
- name: Unit Tests
run: |
set -euo pipefail
go test -covermode=atomic -failfast -race -coverprofile=coverage.txt -timeout 5m -json -v ./... 2>&1 | gotestfmt -showteststatus
- name: Build
run: go build -ldflags="-s -w" -o bin/gemini ./cmd/gemini