diff --git a/.github/workflows/build_binary.yaml b/.github/workflows/build_binary.yaml index 294ede6..4015fac 100644 --- a/.github/workflows/build_binary.yaml +++ b/.github/workflows/build_binary.yaml @@ -19,10 +19,26 @@ jobs: with: fetch-depth: 0 + - name: Free Disk Space (Ubuntu) + uses: jlumbroso/free-disk-space@main + with: + # this might remove tools that are actually needed, + # if set to "true" but frees about 6 GB + tool-cache: false + + # all of these default to true, but feel free to set to + # "false" if necessary for your workflow + android: true + dotnet: true + haskell: true + large-packages: true + docker-images: true + swap-storage: true + - name: Set up Go uses: actions/setup-go@v4 with: - go-version: 1.25.3 + go-version: 1.25.4 - name: Configure Git for Private Modules run: | @@ -31,13 +47,18 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GHT }} + - name: Clean Go cache before build + run: | + go clean -cache -modcache -testcache + df -h + - name: Run GoReleaser uses: goreleaser/goreleaser-action@v6 with: distribution: goreleaser # version: latest version: '~> v2' - args: release + args: release --clean env: GITHUB_TOKEN: ${{ secrets.GHT }} GOPRIVATE: github.com/oneclickvirt/security,github.com/oneclickvirt/privatespeedtest diff --git a/.goreleaser.yaml b/.goreleaser.yaml index b1829f1..bf32be8 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -1,6 +1,11 @@ before: hooks: - go mod tidy -v + - go clean -cache + +# 添加并行构建限制以减少磁盘占用 +project_name: goecs + builds: - id: universal env: