Skip to content

Commit

Permalink
fixing releases action
Browse files Browse the repository at this point in the history
  • Loading branch information
brainfoolong committed Jan 15, 2025
1 parent a1df4b4 commit 2ba753f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ jobs:
uses: actions/setup-go@v5
with:
go-version: 'stable'
cache: false

- name: Run setup
run: bash setup.sh
Expand All @@ -23,7 +24,7 @@ jobs:
run: bash tests/run_tests.sh

- name: Run build
run: bash build.sh
run: bash build.sh ${{ github.ref_name }} ${{ github.sha }}

- name: Release
uses: softprops/action-gh-release@v2
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/tests_go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ jobs:
uses: actions/setup-go@v5
with:
go-version: 'stable'
cache: false

- name: Display Go version
run: go version
Expand Down
6 changes: 2 additions & 4 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,10 @@
SCRIPTDIR=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &>/dev/null && pwd)
BUILDDIR=$SCRIPTDIR/build

GIT_REV=`git rev-parse --abbrev-ref HEAD`
COMMIT_HASH="$(git rev-parse --short HEAD)"
BUILD_TIMESTAMP=$(date -u '+%Y-%m-%dT%H:%M:%S%z')
LDFLAGS=(
"-X 'main.version=${GIT_REV}'"
"-X 'main.commitHash=${COMMIT_HASH}'"
"-X 'main.version=$1'"
"-X 'main.commitHash=$2'"
"-X 'main.buildTime=${BUILD_TIMESTAMP}'"
)

Expand Down

0 comments on commit 2ba753f

Please sign in to comment.