diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 9228d801..66573f00 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -23,19 +23,20 @@ jobs: - name: Create package run: | - mkdir ${{ env.BUILD_DIR }} + mkdir -p ${{ env.BUILD_DIR }}/build/bin/snarkbuild + cp -r ethstorage/prover/snarkjs build/bin cp run.sh ${{ env.BUILD_DIR }} - name: Build run: | - make TARGETOS=linux TARGETARCH=amd64 - mv build/bin ${{ env.BUILD_DIR }} + make build TARGETOS=linux TARGETARCH=amd64 + mv build/bin/es-node ${{ env.BUILD_DIR }}/build/bin/ tar -czvf es-node.${{ github.ref_name }}.linux-amd64.tar.gz ${{ env.BUILD_DIR }} - make TARGETOS=darwin TARGETARCH=amd64 - mv build/bin ${{ env.BUILD_DIR }} + make build TARGETOS=darwin TARGETARCH=amd64 + mv build/bin/es-node ${{ env.BUILD_DIR }}/build/bin/ tar -czvf es-node.${{ github.ref_name }}.darwin-amd64.tar.gz ${{ env.BUILD_DIR }} - make TARGETOS=darwin TARGETARCH=arm64 - mv build/bin ${{ env.BUILD_DIR }} + make build TARGETOS=darwin TARGETARCH=arm64 + mv build/bin/es-node ${{ env.BUILD_DIR }}/build/bin/ tar -czvf es-node.${{ github.ref_name }}.darwin-arm64.tar.gz ${{ env.BUILD_DIR }} - name: Create Release diff --git a/Makefile b/Makefile index 3aea0a2e..3456c2bb 100644 --- a/Makefile +++ b/Makefile @@ -8,13 +8,15 @@ LDFLAGSSTRING +=-X main.Meta=$(VERSION_META) LDFLAGSSTRING +=-X 'main.BuildTime=$(BUILDDATE)' LDFLAGS := -ldflags "$(LDFLAGSSTRING)" -es-node: - env GO111MODULE=on GOOS=$(TARGETOS) GOARCH=$(TARGETARCH) go build -v $(LDFLAGS) -o build/bin/es-node ./cmd/es-node/ +es-node: build cp -r ethstorage/prover/snarkjs build/bin mkdir -p build/bin/snarkbuild +build: + env GO111MODULE=on GOOS=$(TARGETOS) GOARCH=$(TARGETARCH) go build -v $(LDFLAGS) -o build/bin/es-node ./cmd/es-node/ + clean: - rm build -r + rm -r build test: go test -v ./...