Skip to content

Update ldflags in goreleaser to capture build info during release #10

Update ldflags in goreleaser to capture build info during release

Update ldflags in goreleaser to capture build info during release #10

Workflow file for this run

#
# Releaser workflow setup
# https://goreleaser.com/ci/actions/
#
name: release
# run only on tags
on:
push:
tags:
- 'v*' # Run pn Push tag
permissions:
contents: write # needed to write releases
id-token: write # needed for keyless signing
packages: write # needed for ghcr access
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # this is important, otherwise it won't checkout the full tree (i.e. no previous tags)
- uses: actions/setup-go@v4
with:
go-version: 1.21 # Go version
cache: true
- name: Run tests
run: go test ./... -coverprofile=coverage.out -coverpkg=./... -covermode=atomic
- uses: sigstore/[email protected] # installs cosign
- uses: anchore/sbom-action/[email protected] # installs syft
- uses: goreleaser/goreleaser-action@v5 # run goreleaser
id: goreleaser
with:
version: latest
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: verify release
run: |
bash ./.github/workflows/verify.sh