17
17
matrix :
18
18
include :
19
19
- { os: ubuntu-20.04, target: x86_64-unknown-linux-gnu, platform: linux-x64, cross: general }
20
- - { os: ubuntu-22.04, target: aarch64-unknown-linux-gnu, platform: linux-arm64, cross: cross }
20
+ - { os: ubuntu-22.04, target: aarch64-unknown-linux-gnu, platform: linux-arm64, cross: aarch }
21
21
- { os: ubuntu-20.04, target: x86_64-unknown-linux-musl, platform: linux-musl, cross: cross }
22
22
- { os: ubuntu-22.04, target: x86_64-unknown-freebsd, platform: linux-bsd, cross: bsd }
23
23
- { os: macos-latest, target: x86_64-apple-darwin, platform: darwin-x64, cross: general }
@@ -35,11 +35,24 @@ jobs:
35
35
if : ${{ matrix.cross == 'general' }}
36
36
run : |
37
37
rustup target add ${{ matrix.target }}
38
- cargo build --release --target ${{ matrix.target }} --target-dir target/${{ matrix.platform }}
38
+ cargo build --release --target ${{ matrix.target }}
39
39
- name : Build - cross
40
40
if : ${{ matrix.cross == 'cross' }}
41
41
run : |
42
42
cargo install cross
43
- cross build --release --target ${{ matrix.target }} --target-dir target/${{ matrix.platform }}
44
-
45
-
43
+ cross build --release --target ${{ matrix.target }}
44
+ - name : package-unix
45
+ if : ${{ matrix.os != 'windows-latest' }}
46
+ run : |
47
+ cp target/${{ matrix.platform }}/release/lua-language-server ${{ github.workspace }}/artifact/
48
+ cp resources ${{ github.workspace }}/artifact/ -r
49
+ - name : package-windows
50
+ if : ${{ matrix.os == 'windows-latest' }}
51
+ run : |
52
+ powershell -Command "Copy-Item -Path target\${{ matrix.platform }}\release\lua-language-server.exe -Destination ${{ github.workspace }}\artifact\"
53
+ powershell -Command "Copy-Item -Path resources -Destination ${{ github.workspace }}\artifact\ -Recurse"
54
+ - name : Upload
55
+ uses : actions/upload-artifact@v3
56
+ with :
57
+ name : lua-language-server-${{ matrix.platform }}
58
+ path : ${{ github.workspace }}/artifact/
0 commit comments