File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3838 echo 'BUILD_TIME=$(date --iso-8601=seconds)' >> .release-env
3939 echo 'VERSION=${{ github.event.release.tag_name }}' >> .release-env
4040 echo 'GITHUB_TOKEN=${{ secrets.FLOW_CLI_RELEASE }}' >> .release-env
41+ # Create temp and cache directories in workspace; set container-visible paths
42+ mkdir -p ${GITHUB_WORKSPACE}/tmp
43+ mkdir -p ${GITHUB_WORKSPACE}/.cache/go-build
44+ mkdir -p ${GITHUB_WORKSPACE}/.cache/gomod
45+ echo "TMPDIR=/go/src/github.com/onflow/flow-cli/tmp" >> .release-env
46+ echo "GOTMPDIR=/go/src/github.com/onflow/flow-cli/tmp" >> .release-env
47+ echo "GOCACHE=/go/src/github.com/onflow/flow-cli/.cache/go-build" >> .release-env
48+ echo "GOMODCACHE=/go/src/github.com/onflow/flow-cli/.cache/gomod" >> .release-env
49+ echo "XDG_CACHE_HOME=/go/src/github.com/onflow/flow-cli/.cache" >> .release-env
4150 - name : Build and Release
4251 run : make release
Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ builds:
1717 env :
1818 - CGO_CFLAGS=-O2 -D__BLST_PORTABLE__ -std=gnu11
1919 - CGO_ENABLED=1
20+ - GOFLAGS=-p=1
2021 # Darwin
2122 - CC_darwin_amd64=o64-clang
2223 - CXX_darwin_amd64=o64-clang++
@@ -40,7 +41,6 @@ builds:
4041 - -mod=readonly
4142 ldflags :
4243 - -X github.com/onflow/flow-cli/build.semver={{ .Env.VERSION }} -X github.com/onflow/flow-cli/build.commit={{ .ShortCommit }} -X github.com/onflow/flow-cli/internal/command.MixpanelToken={{ .Env.MIXPANEL_PROJECT_TOKEN }} -X github.com/onflow/flow-cli/internal/accounts.accountToken={{ .Env.LILICO_TOKEN }}
43-
4444
4545archives :
4646 - id : golang-cross
Original file line number Diff line number Diff line change @@ -105,6 +105,8 @@ release:
105105 docker run \
106106 --rm \
107107 --env-file .release-env \
108+ -e GOFLAGS=" -p=1" \
109+ -e GOMAXPROCS=1 \
108110 -e GORELEASER_PARALLEL=1 \
109111 -v /var/run/docker.sock:/var/run/docker.sock \
110112 -v ` pwd` :/go/src/$(PACKAGE_NAME ) \
You can’t perform that action at this time.
0 commit comments