From 4e35df28908128fbdd846121a2f9ca3d88ba7b2d Mon Sep 17 00:00:00 2001 From: Dennis Staal Date: Tue, 6 Feb 2024 11:17:43 +0100 Subject: [PATCH] Adding github latest tag --- .github/workflows/go.yml | 4 +--- .github/workflows/release.yml | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index adef2a9..03b9179 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -25,9 +25,7 @@ jobs: fetch-depth: '0' - name: Build - run: | - LATEST_TAG=$(git describe --tags) - go build -ldflags "-X main.Build=$LATEST_TAG" -v ./... + run: go build -v ./... - name: Test run: go test -v ./... diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b51d0c2..68f1288 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -29,4 +29,4 @@ jobs: binary_name: "james" extra_files: LICENSE README.md sha256sum: true - ldflags: "-X main.Build=$(git describe --tags)" + ldflags: "-X main.Build=${GITHUB_REF#refs/tags/v}"