@@ -17,19 +17,16 @@ jobs:
17
17
os : ubuntu-latest
18
18
- target : x86_64-pc-windows-msvc
19
19
os : windows-latest
20
+ - target : aarch64-pc-windows-msvc
21
+ os : windows-latest
20
22
runs-on : ${{ matrix.build.os }}
21
23
steps :
22
24
- uses : actions/checkout@v4
25
+ - name : Install target
26
+ run : rustup target add ${{ matrix.build.target }}
23
27
- name : Setup musl
24
- run : |
25
- rustup target add x86_64-unknown-linux-musl
26
- sudo apt-get install -y musl-tools
27
- echo 'LDFLAGS=-Wl,--copy-dt-needed-entries' >> $GITHUB_ENV
28
- echo 'RUSTFLAGS=-C target-feature=+crt-static' >> $GITHUB_ENV
29
- if : matrix.build.target == 'x86_64-unknown-linux-musl'
30
- - name : Setup Apple Silicon
31
- run : rustup target add aarch64-apple-darwin
32
- if : matrix.build.target == 'aarch64-apple-darwin'
28
+ run : sudo apt-get install -y musl-tools
29
+ if : endsWith(matrix.build.target, '-musl')
33
30
- uses : Swatinem/rust-cache@v2
34
31
- name : Build
35
32
env :
@@ -45,12 +42,17 @@ jobs:
45
42
--message-format=json \
46
43
| jq -r '.message.rendered // .executable // empty'
47
44
)"
48
- echo "ARTIFACT_PATH=$output" >> $GITHUB_ENV
45
+ {
46
+ echo 'ARTIFACT_PATHS<<EOF'
47
+ echo "$output"
48
+ echo 'EOF'
49
+ } >> "$GITHUB_ENV"
49
50
- name : Upload binary
50
51
uses : actions/upload-artifact@v4
51
52
with :
52
53
name : ${{ matrix.build.target }}
53
- path : ${{ env.ARTIFACT_PATH }}
54
+ path : ${{ env.ARTIFACT_PATHS }}
55
+ if-no-files-found : error
54
56
release :
55
57
name : Release
56
58
needs : build
0 commit comments