diff --git a/.github/workflows/build-release.yaml b/.github/workflows/build-release.yaml index e9580c209..0129c3a07 100644 --- a/.github/workflows/build-release.yaml +++ b/.github/workflows/build-release.yaml @@ -9,24 +9,22 @@ jobs: name: Release Go Binary runs-on: ubuntu-latest steps: - # See https://github.com/onflow/flow-cli/pull/1431 for more information - - name: Free up disk space - run: | - sudo rm -rf ${RUNNER_TOOL_CACHE} - sudo rm -rf /usr/share/dotnet - sudo rm -rf /usr/local/share/chromium - sudo rm -rf /usr/local/share/powershell - sudo rm -rf /usr/local/share/vcpkg - sudo rm -rf /usr/local/share/miniconda - sudo rm -rf /opt/ghc - sudo rm -rf /opt/hostedtoolcache/CodeQL - sudo rm -rf /usr/local/share/boost - sudo rm -rf "$AGENT_TOOLSDIRECTORY" - sudo docker image prune --all --force - sudo docker builder prune -a -f - sudo apt-get clean - df -h - uses: actions/checkout@v6 + with: + fetch-depth: 0 # ensure tags/history for goreleaser + fetch-tags: true + + - name: Free disk space (keep toolcache) + uses: jlumbroso/free-disk-space@v1.3.1 + with: + tool-cache: false # IMPORTANT: don't wipe runner tool cache + android: true + dotnet: true + haskell: true + large-packages: true + docker-images: true + swap-storage: true + - name: Setup Go uses: actions/setup-go@v6 with: @@ -46,7 +44,8 @@ jobs: echo 'GITHUB_TOKEN=${{ secrets.FLOW_CLI_RELEASE }}' >> .release-env # Create temp dir in workspace; set container-visible paths mkdir -p ${GITHUB_WORKSPACE}/tmp - echo "TMPDIR=/go/src/github.com/onflow/flow-cli/tmp" >> .release-env - echo "GOTMPDIR=/go/src/github.com/onflow/flow-cli/tmp" >> .release-env + echo "TMPDIR=/tmp" >> .release-env + echo "GOTMPDIR=/tmp" >> .release-env + - name: Build and Release run: make release