@@ -32,33 +32,39 @@ jobs:
3232 os : ubuntu-22.04
3333 target : x86_64-unknown-linux-gnu
3434 artifact_name : squawk-linux-x64
35+ vscode_artifact_name : linux-x64
3536
3637 - name : Linux arm64
3738 os : ubuntu-22.04
3839 target : aarch64-unknown-linux-gnu
3940 artifact_name : squawk-linux-arm64
41+ vscode_artifact_name : linux-arm64
4042 rustflags : " -C linker=aarch64-linux-gnu-gcc"
4143
4244 - name : Linux Alpine x86_64
4345 os : ubuntu-22.04
4446 target : x86_64-unknown-linux-musl
4547 artifact_name : squawk-linux-musl-x64
48+ vscode_artifact_name : alpine-x64
4649 rustflags : " -C linker=rust-lld"
4750
4851 - name : Windows x86_64
4952 os : windows-latest
5053 target : x86_64-pc-windows-msvc
5154 artifact_name : squawk-windows-x64.exe
55+ vscode_artifact_name : win32-x64
5256
5357 - name : macOS x86_64
5458 os : macos-latest
5559 target : x86_64-apple-darwin
5660 artifact_name : squawk-darwin-x64
61+ vscode_artifact_name : darwin-x64
5762
5863 - name : macOS arm64
5964 os : macos-latest
6065 target : aarch64-apple-darwin
6166 artifact_name : squawk-darwin-arm64
67+ vscode_artifact_name : darwin-arm64
6268
6369 name : ${{ matrix.name }}
6470 runs-on : ${{ matrix.os }}
@@ -106,12 +112,53 @@ jobs:
106112 name : release-${{ matrix.artifact_name }}
107113 path : target/release/${{ matrix.artifact_name }}
108114
115+ - name : VSCode - Make server dir
116+ shell : bash
117+ run : mkdir squawk-vscode/server
118+
119+ - name : VSCode - Copy binary into extension (windows)
120+ if : matrix.target == 'x86_64-pc-windows-msvc'
121+ shell : bash
122+ run : cp target/release/${{ matrix.artifact_name }} squawk-vscode/server/squawk.exe
123+
124+ - name : VSCode - Copy binary into extension (linux, mac)
125+ if : matrix.target != 'x86_64-pc-windows-msvc'
126+ shell : bash
127+ run : cp target/release/${{ matrix.artifact_name }} squawk-vscode/server/squawk
128+
129+ - name : VSCode - Setup pnpm
130+ uses : pnpm/action-setup@v2
131+ with :
132+ version : 8
133+
134+ - name : VSCode - Setup node
135+ uses : actions/setup-node@v3
136+ with :
137+ node-version-file : " squawk-vscode/package.json"
138+ cache-dependency-path : " squawk-vscode/pnpm-lock.yaml"
139+ cache : " pnpm"
140+
141+ - name : VSCode - Install JS dependencies
142+ working-directory : " squawk-vscode"
143+ run : pnpm install
144+
145+ - name : VSCode - Build
146+ working-directory : " squawk-vscode"
147+ run : pnpm exec vsce pack --no-dependencies --target ${{ matrix.vscode_artifact_name }}
148+
149+ - name : VSCode - Artifact
150+ uses : actions/upload-artifact@v4
151+ with :
152+ name : squawk-vscode-${{ matrix.vscode_artifact_name }}
153+ path : squawk-vscode/*.vsix
154+
109155 - name : Release
110156 uses : softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844 # pin@v1
111157 if : startsWith(github.ref, 'refs/tags/')
112158 with :
113159 files : |
114160 target/release/${{ matrix.artifact_name }}
161+ squawk-vscode/*.vsix
115162 env :
116163 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
117164
0 commit comments