stages: - test - build - release .test_template: &test stage: test image: golang:1.22-alpine script: - go vet ./... - go build -o /dev/null ./cmd/arcline-audit/ test:linux: <<: *test .build_template: &build stage: build image: golang:1.22-alpine script: - apk add --no-cache make - make ${TARGET} artifacts: paths: - arcline-audit-* expire_in: 30 days build:linux: <<: *build variables: TARGET: linux build:darwin: <<: *build variables: TARGET: darwin build:windows: <<: *build variables: TARGET: windows release: stage: release image: golang:1.22-alpine script: - apk add --no-cache make - make release - echo "Release artifacts: arcline-audit-*" artifacts: paths: - arcline-audit-linux-amd64 - arcline-audit-darwin-amd64 - arcline-audit-windows-amd64.exe expire_in: 90 days only: - tags