-
Notifications
You must be signed in to change notification settings - Fork 50
63 lines (58 loc) · 1.9 KB
/
package_vscode_plugin.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
name: Package VS Code Plugin
on:
push:
branches: ["master"]
pull_request:
branches: ["master"]
jobs:
package:
name: Package - ${{ matrix.platform.code_target }}
if: github.event.pull_request.draft == false
strategy:
matrix:
platform:
- os: windows-latest
rust_target: x86_64-pc-windows-msvc
code_target: win32-x64
- os: macOS-latest
rust_target: x86_64-apple-darwin
code_target: darwin-x64
- os: macOS-latest
rust_target: aarch64-apple-darwin
code_target: darwin-arm64
- os: ubuntu-20.04
rust_target: x86_64-unknown-linux-gnu
code_target: linux-x64
- os: ubuntu-20.04
rust_target: aarch64-unknown-linux-gnu
code_target: linux-arm64
runs-on: ${{ matrix.platform.os }}
steps:
- uses: actions/checkout@v4
- uses: extractions/setup-just@v2
- uses: actions/setup-node@v4
with:
node-version: 20
- name: Build harper-ls
uses: houseabsolute/actions-rust-cross@v0
with:
target: ${{ matrix.platform.rust_target }}
args: "--locked --release --bin harper-ls"
strip: true
- name: Package extension
shell: bash
run: |
bin_dir="packages/vscode-plugin/bin"
release_dir="target/${{ matrix.platform.rust_target }}/release"
mkdir "$bin_dir"
if [[ "${{ matrix.platform.os }}" == "windows-latest" ]]; then
cp "${release_dir}/harper-ls.exe" "$bin_dir"
else
cp "${release_dir}/harper-ls" "$bin_dir"
fi
just package-vscode ${{ matrix.platform.code_target }}
- name: Upload extension
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.platform.code_target }}
path: "packages/vscode-plugin/*.vsix"