File tree Expand file tree Collapse file tree 3 files changed +30
-3
lines changed
Expand file tree Collapse file tree 3 files changed +30
-3
lines changed Original file line number Diff line number Diff line change 1+ name : ' Cleanup Runner'
2+ description : ' Remove unused tools in the runner image to free disk space'
3+
4+ runs :
5+ using : ' composite'
6+ steps :
7+ - name : Remove unused tools in the runner image
8+ shell : bash
9+ run : |
10+ sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc /opt/hostedtoolcache/CodeQL
11+ sudo docker image prune --all --force || true
12+ sudo docker builder prune -a --force || true
Original file line number Diff line number Diff line change 1818 with :
1919 fetch-depth : 0
2020
21+ - name : Cleanup large tools for build space
22+ uses : ./.github/actions/cleanup-runner
23+
2124 - name : Update Rust toolchain
2225 run : |
2326 rustup update --no-self-update
Original file line number Diff line number Diff line change @@ -12,15 +12,22 @@ jobs:
1212 runs-on : ubuntu-latest
1313 env :
1414 CARGO_TERM_COLOR : always
15+ # Important: use an absolute path so `cargo publish` verification builds
16+ # (which happen from `target/package/...`) don't create nested `target/` dirs.
17+ CARGO_TARGET_DIR : ${{ github.workspace }}/target
1518 steps :
1619 - name : Check out code
1720 uses : actions/checkout@v4
1821 with :
1922 fetch-depth : 0
23+ # Ensure the release tag refers to the latest commit on main.
24+ # Compare the commit SHA that triggered the workflow with the HEAD of the branch we just
25+ # checked out (main).
2026 ref : main
21- # Ensure the release tag refers to the latest commit on main.
22- # Compare the commit SHA that triggered the workflow with the HEAD of the branch we just
23- # checked out (main).
27+
28+ - name : Cleanup large tools for build space
29+ uses : ./.github/actions/cleanup-runner
30+
2431 - name : Verify release was triggered from main HEAD
2532 run : |
2633 tag_sha="${{ github.sha }}"
5057 cd ../web-client
5158 cargo publish --dry-run
5259
60+ - name : Cleanup cargo package artifacts (after dry-run)
61+ if : always()
62+ run : |
63+ rm -rf "$CARGO_TARGET_DIR/package" || true
64+
5365 - name : Publish crates
5466 env :
5567 CARGO_REGISTRY_TOKEN : ${{ secrets.CRATES_IO_TOKEN }}
You can’t perform that action at this time.
0 commit comments