Skip to content

Commit 7de1597

Browse files
committed
add upload
1 parent 180adfa commit 7de1597

File tree

1 file changed

+18
-5
lines changed

1 file changed

+18
-5
lines changed

.github/workflows/build.yml

+18-5
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
matrix:
1818
include:
1919
- { 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 }
2121
- { os: ubuntu-20.04, target: x86_64-unknown-linux-musl, platform: linux-musl, cross: cross }
2222
- { os: ubuntu-22.04, target: x86_64-unknown-freebsd, platform: linux-bsd, cross: bsd }
2323
- { os: macos-latest, target: x86_64-apple-darwin, platform: darwin-x64, cross: general }
@@ -35,11 +35,24 @@ jobs:
3535
if: ${{ matrix.cross == 'general' }}
3636
run: |
3737
rustup target add ${{ matrix.target }}
38-
cargo build --release --target ${{ matrix.target }} --target-dir target/${{ matrix.platform }}
38+
cargo build --release --target ${{ matrix.target }}
3939
- name: Build - cross
4040
if: ${{ matrix.cross == 'cross' }}
4141
run: |
4242
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

Comments
 (0)