Skip to content

Commit 0d194c3

Browse files
nialexsanjribbink
andauthored
Fix release build in GHA (#2237)
* debug release * on push * change tmp * revert push * Update .github/workflows/build-release.yaml * Update .github/workflows/build-release.yaml * Update .github/workflows/build-release.yaml * Update .github/workflows/build-release.yaml * Update .github/workflows/build-release.yaml --------- Co-authored-by: Jordan Ribbink <[email protected]>
1 parent c3a5113 commit 0d194c3

File tree

1 file changed

+18
-19
lines changed

1 file changed

+18
-19
lines changed

.github/workflows/build-release.yaml

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -9,24 +9,22 @@ jobs:
99
name: Release Go Binary
1010
runs-on: ubuntu-latest
1111
steps:
12-
# See https://github.com/onflow/flow-cli/pull/1431 for more information
13-
- name: Free up disk space
14-
run: |
15-
sudo rm -rf ${RUNNER_TOOL_CACHE}
16-
sudo rm -rf /usr/share/dotnet
17-
sudo rm -rf /usr/local/share/chromium
18-
sudo rm -rf /usr/local/share/powershell
19-
sudo rm -rf /usr/local/share/vcpkg
20-
sudo rm -rf /usr/local/share/miniconda
21-
sudo rm -rf /opt/ghc
22-
sudo rm -rf /opt/hostedtoolcache/CodeQL
23-
sudo rm -rf /usr/local/share/boost
24-
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
25-
sudo docker image prune --all --force
26-
sudo docker builder prune -a -f
27-
sudo apt-get clean
28-
df -h
2912
- uses: actions/checkout@v6
13+
with:
14+
fetch-depth: 0 # ensure tags/history for goreleaser
15+
fetch-tags: true
16+
17+
- name: Free disk space (keep toolcache)
18+
uses: jlumbroso/[email protected]
19+
with:
20+
tool-cache: false # IMPORTANT: don't wipe runner tool cache
21+
android: true
22+
dotnet: true
23+
haskell: true
24+
large-packages: true
25+
docker-images: true
26+
swap-storage: true
27+
3028
- name: Setup Go
3129
uses: actions/setup-go@v6
3230
with:
@@ -46,7 +44,8 @@ jobs:
4644
echo 'GITHUB_TOKEN=${{ secrets.FLOW_CLI_RELEASE }}' >> .release-env
4745
# Create temp dir in workspace; set container-visible paths
4846
mkdir -p ${GITHUB_WORKSPACE}/tmp
49-
echo "TMPDIR=/go/src/github.com/onflow/flow-cli/tmp" >> .release-env
50-
echo "GOTMPDIR=/go/src/github.com/onflow/flow-cli/tmp" >> .release-env
47+
echo "TMPDIR=/tmp" >> .release-env
48+
echo "GOTMPDIR=/tmp" >> .release-env
49+
5150
- name: Build and Release
5251
run: make release

0 commit comments

Comments
 (0)