Skip to content

Commit

Permalink
Merge pull request #14 from cego/staal0-add-version-to-action-workflow
Browse files Browse the repository at this point in the history
Add version to Github workflow
  • Loading branch information
staal0 authored Feb 6, 2024
2 parents 68f629e + 1991e6d commit 590ab5b
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,16 @@ jobs:
with:
go-version: 1.18

- name: Checkout code
- name: Git checkout
uses: actions/checkout@v4
with:
fetch-depth: '0'

- name: Build
run: |
echo Build James ${GITHUB_REF#refs/tags/v}
go build -ldflags "-X main.Build=${GITHUB_REF#refs/tags/v}" -v ./...
LATEST_TAG=$(git describe --tags)
echo Build James $LATEST_TAG
go build -ldflags "-X main.Build=$LATEST_TAG" -v ./...
- name: Test
run: go test -v ./...

0 comments on commit 590ab5b

Please sign in to comment.