File tree Expand file tree Collapse file tree 1 file changed +70
-0
lines changed Expand file tree Collapse file tree 1 file changed +70
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Release Cargo-bazel
2+ on :
3+ workflow_dispatch :
4+ push :
5+ branches :
6+ - scuffle-fork
7+
8+ defaults :
9+ run :
10+ shell : bash
11+
12+ jobs :
13+ builds :
14+ strategy :
15+ matrix :
16+ include :
17+ - runner : ubuntu-22.04
18+ os : linux
19+ arch : x86_64
20+ - runner : ubuntu-22.04-arm
21+ os : linux
22+ arch : arm64
23+ - runner : windows-2022
24+ os : windows
25+ arch : x86_64
26+ - runner : macos-13
27+ os : macos
28+ arch : x86_64
29+ - runner : macos-14
30+ os : macos
31+ arch : arm64
32+ runs-on : ${{ matrix.runner }}
33+ env :
34+ BIN_EXT : ${{ matrix.os == 'windows' && '.exe' || '' }}
35+ steps :
36+ - uses : actions/checkout@v5
37+
38+ - name : Install rust toolchains for host
39+ run : |
40+ version="$(grep 'DEFAULT_RUST_VERSION =' ./rust/private/common.bzl | grep -o '[[:digit:].]\+')"
41+ rustup install "${version}"
42+ rustup override set "${version}"
43+
44+ - name : Build cargo-bazel
45+ run : cargo build -r -p cargo-bazel
46+ working-directory : ./crate_universe
47+
48+ - name : Upload artifact
49+ uses : actions/upload-artifact@v4
50+ with :
51+ name : cargo-bazel-${{ matrix.os }}-${{ matrix.arch }}${{ env.BIN_EXT }}
52+ path : ./crate_universe/target/release/cargo-bazel${{ env.BIN_EXT }}
53+
54+ release :
55+ needs : builds
56+ runs-on : ubuntu-22.04
57+ steps :
58+ - name : Download artifacts
59+ uses : actions/download-artifact@v5
60+ with :
61+ path : ./artifacts
62+
63+ - name : Create GitHub Release
64+ uses : softprops/action-gh-release@v2
65+ with :
66+ tag_name : commit-${{ github.sha }}
67+ name : " cargo-bazel build for ${{ github.sha }}"
68+ files : ./artifacts/**/*
69+ env :
70+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
You can’t perform that action at this time.
0 commit comments