Skip to content

Commit 2ba753f

Browse files
committed
fixing releases action
1 parent a1df4b4 commit 2ba753f

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

.github/workflows/release.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ jobs:
1515
uses: actions/setup-go@v5
1616
with:
1717
go-version: 'stable'
18+
cache: false
1819

1920
- name: Run setup
2021
run: bash setup.sh
@@ -23,7 +24,7 @@ jobs:
2324
run: bash tests/run_tests.sh
2425

2526
- name: Run build
26-
run: bash build.sh
27+
run: bash build.sh ${{ github.ref_name }} ${{ github.sha }}
2728

2829
- name: Release
2930
uses: softprops/action-gh-release@v2

.github/workflows/tests_go.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ jobs:
2020
uses: actions/setup-go@v5
2121
with:
2222
go-version: 'stable'
23+
cache: false
2324

2425
- name: Display Go version
2526
run: go version

build.sh

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,10 @@
22
SCRIPTDIR=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &>/dev/null && pwd)
33
BUILDDIR=$SCRIPTDIR/build
44

5-
GIT_REV=`git rev-parse --abbrev-ref HEAD`
6-
COMMIT_HASH="$(git rev-parse --short HEAD)"
75
BUILD_TIMESTAMP=$(date -u '+%Y-%m-%dT%H:%M:%S%z')
86
LDFLAGS=(
9-
"-X 'main.version=${GIT_REV}'"
10-
"-X 'main.commitHash=${COMMIT_HASH}'"
7+
"-X 'main.version=$1'"
8+
"-X 'main.commitHash=$2'"
119
"-X 'main.buildTime=${BUILD_TIMESTAMP}'"
1210
)
1311

0 commit comments

Comments
 (0)