From c8a628838a8a7bbb2df25a332453c9c955b4233e Mon Sep 17 00:00:00 2001 From: Geoff Lee Date: Mon, 28 Oct 2024 17:34:32 +0900 Subject: [PATCH] chore: release stataically-built binary with _static postfix (#291) * release stataically-built binary with _static postfix * use dir stack instead of cd * use different dir for static binary * fix static build action --- .github/workflows/build-linux-amd64.yml | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-linux-amd64.yml b/.github/workflows/build-linux-amd64.yml index 8125fa8c..cdd4daf4 100644 --- a/.github/workflows/build-linux-amd64.yml +++ b/.github/workflows/build-linux-amd64.yml @@ -37,18 +37,31 @@ jobs: export GOARCH=${GOARCH} export GOOS=${GOOS} make build-linux-with-shared-library - cd ./build + pushd build mkdir -p initia_${VERSION} mv libmovevm.so initia_${VERSION}/libmovevm.${ARCH_NAME}.so mv libcompiler.so initia_${VERSION}/libcompiler.${ARCH_NAME}.so mv initiad initia_${VERSION}/ tar -czvf initia_${VERSION}_Linux_${ARCH_NAME}.tar.gz initia_${VERSION} + popd + + - name: Static Build for Linux AMD64 + run: | + export GOARCH=${GOARCH} + export GOOS=${GOOS} + make build-linux + pushd build + mkdir -p initia_${VERSION}_static + mv initiad initia_${VERSION}_static/ + tar -czvf initia_${VERSION}_Linux_${ARCH_NAME}_static.tar.gz initia_${VERSION}_static + popd - name: Release uses: softprops/action-gh-release@v2 with: files: | ./build/initia_${{ env.VERSION }}_Linux_${{ env.ARCH_NAME }}.tar.gz + ./build/initia_${{ env.VERSION }}_Linux_${{ env.ARCH_NAME }}_static.tar.gz env: Version: ${{ env.VERSION }} ARCH_NAME: ${{ env.ARCH_NAME }}