diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6469df577c..5f36c126dd 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -40,6 +40,11 @@ jobs: -e CGO_ENABLED=1 \ -e GITHUB_TOKEN \ -e SLACK_WEBHOOK \ + -e COMMIT \ + -e GITHUB_REF_NAME=${GITHUB_REF_NAME} \ + -e GITHUB_SHA=${GITHUB_SHA} \ + -e GITHUB_REF=${GITHUB_REF} \ + -e RELEASE_TIME=$(date -u +"%Y-%m-%dT%H:%M:%SZ") \ -v /var/run/docker.sock:/var/run/docker.sock \ -v `pwd`:/go/src/$(PACKAGE_NAME) \ -w /go/src/$(PACKAGE_NAME) \ @@ -50,5 +55,8 @@ jobs: GOLANG_CROSS_VERSION: v1.20.5 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} VERSION: ${{ steps.prepare.outputs.tag_name }} + COMMIT: ${{ github.sha }} SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} SLACK_CHANNEL: ${{ secrets.SLACK_CHANNEL }} + + diff --git a/.goreleaser.yml b/.goreleaser.yml index 446170d70b..0a8a78443f 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -16,7 +16,7 @@ builds: env: - CC=o64-clang - CXX=o64-clang++ - ldflags: -s -w -X 'github.com/topos-protocol/polygon-edge/versioning.Version=v{{ .Version }}' + ldflags: -s -w -X 'github.com/0xPolygon/polygon-edge/versioning.Version=${GITHUB_REF_NAME}' - id: darwin-arm64 main: ./main.go @@ -28,7 +28,7 @@ builds: env: - CC=oa64-clang - CXX=oa64-clang++ - ldflags: -s -w -X 'github.com/topos-protocol/polygon-edge/versioning.Version=v{{ .Version }}' + ldflags: -s -w -X 'github.com/0xPolygon/polygon-edge/versioning.Version=v{{ .Version }}' - id: linux-amd64 main: ./main.go @@ -42,7 +42,7 @@ builds: - CXX=g++ ldflags: # We need to build a static binary because we are building in a glibc based system and running in a musl container - -s -w -linkmode external -extldflags "-static" -X 'github.com/topos-protocol/polygon-edge/versioning.Version=v{{ .Version }}' + -s -w -linkmode external -extldflags "-static" -X 'github.com/0xPolygon/polygon-edge/versioning.Version=${{ GITHUB_REF_NAME }}' -X 'github.com/0xPolygon/polygon-edge/versioning.Commit={{ Commit }}' -X 'github.com/0xPolygon/polygon-edge/versioning.Branch=${{ GITHUB_REF }}' -X 'github.com/0xPolygon/polygon-edge/versioning.BuildTime=${{ RELEASE_TIME }}' tags: - netgo - osusergo @@ -59,7 +59,7 @@ builds: - CXX=aarch64-linux-gnu-g++ ldflags: # We need to build a static binary because we are building in a glibc based system and running in a musl container - -s -w -linkmode external -extldflags "-static" -X 'github.com/topos-protocol/polygon-edge/versioning.Version=v{{ .Version }}' + -s -w -linkmode external -extldflags "-static" -X 'github.com/0xPolygon/polygon-edge/versioning.Version=v{{ .Version }}' tags: - netgo - osusergo