Skip to content

v1.14.0

v1.14.0 #58

Workflow file for this run

name: Go Build
on:
release:
types: [ published ]
workflow_dispatch:
inputs:
tag:
description: 'Tag to build'
required: true
jobs:
releases-matrix:
name: Release Go Binary
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
goos: [linux, windows, darwin]
goarch: ["386", amd64]
exclude:
- goarch: "386"
goos: darwin
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.release.tag_name || github.event.inputs.tag }}
- name: Get date
id: date
run: echo "value=$(date +%FT%TZ)" >> "${GITHUB_OUTPUT}"
- uses: wangyoucao577/go-release-action@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
goversion: 1.21
goos: ${{ matrix.goos }}
goarch: ${{ matrix.goarch }}
release_tag: ${{ github.event.release.tag_name || github.event.inputs.tag }}
ldflags: |
-X github.com/prometheus/common/version.Version=${{ github.event.release.tag_name || github.event.inputs.tag }}
-X github.com/prometheus/common/version.Revision=${{ github.sha }}
-X github.com/prometheus/common/version.Branch=${{ github.ref }}
-X github.com/prometheus/common/version.BuildDate=${{ steps.date.outputs.value }}
-X github.com/prometheus/common/version.BuildUser=github-actions