-
Notifications
You must be signed in to change notification settings - Fork 4
91 lines (78 loc) · 2.52 KB
/
vsix.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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
name: vsix
on:
push:
branches:
- main
jobs:
build-language-server:
timeout-minutes: 10
strategy:
matrix:
include:
- os: macos-11
target: x86_64-apple-darwin
bin: slice-language-server
- os: macos-11
target: aarch64-apple-darwin
bin: slice-language-server
- os: ubuntu-22.04
target: x86_64-unknown-linux-gnu
bin: slice-language-server
- os: ubuntu-22.04
target: aarch64-unknown-linux-gnu
bin: slice-language-server
- os: windows-2022
target: x86_64-pc-windows-msvc
bin: slice-language-server.exe
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Build
uses: ./.github/actions/build-language-server
with:
cargo-build-args: --release
target: ${{ matrix.target }}
- name: Upload language server
uses: actions/upload-artifact@v4
with:
name: slice-language-server_${{ matrix.target }}
path: ./server/target/${{ matrix.target }}/release/${{ matrix.bin }}
if-no-files-found: error
build-vsix:
needs: build-language-server
runs-on: ubuntu-22.04
timeout-minutes: 10
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Download language server
uses: actions/download-artifact@v4
with:
path: ./server/target
- name: Move language servers
run: |
set -eux
cd ./server/target
for archive in slice-language-server_*; do
target=${archive#slice-language-server_}
mv $archive ${target}
mkdir ${target}/release
mv ${target}/slice-language-server* ${target}/release
chmod +x ${target}/release/*
done
# Print the contents of the directory to make sure everything is in the right place
find .
- uses: actions/setup-node@v4
- name: Install dependencies
run: npm ci
- name: Build VSIX
run: npx @vscode/vsce package
- name: Get package version
id: package-version
run: echo "VERSION=$(npm pkg get version | jq -r)" >> "$GITHUB_OUTPUT"
- uses: actions/upload-artifact@v4
with:
name: "slice-${{ steps.package-version.outputs.VERSION }}.vsix"
path: "slice-${{ steps.package-version.outputs.VERSION }}.vsix"
if-no-files-found: error