@@ -182,6 +182,22 @@ jobs:
182182 needs : [build-release]
183183 if : github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/')
184184 runs-on : ubuntu-latest
185+ strategy :
186+ fail-fast : false
187+ matrix :
188+ include :
189+ - target : linux-x64
190+ artifact : log2src-${{ github.ref_name }}-linux-x64
191+ vsce-target : linux-x64
192+ - target : darwin-x64
193+ artifact : log2src-${{ github.ref_name }}-macos-x64
194+ vsce-target : darwin-x64
195+ - target : darwin-arm64
196+ artifact : log2src-${{ github.ref_name }}-macos-arm64
197+ vsce-target : darwin-arm64
198+ - target : win32-x64
199+ artifact : log2src-${{ github.ref_name }}-windows-x64
200+ vsce-target : win32-x64
185201
186202 steps :
187203 - name : Checkout repository
@@ -204,13 +220,15 @@ jobs:
204220 with :
205221 path : artifacts
206222
207- - name : Extract binaries for VS Code extension
223+ - name : Extract binary for VS Code extension target
208224 run : |
209- mkdir -p editors/code/bin/{linux-x64,darwin-x64,darwin-arm64,win32-x64}
210- tar -xzf artifacts/log2src-${{ github.ref_name }}-linux-x64/log2src-${{ github.ref_name }}-linux-x64.tar.gz -C editors/code/bin/linux-x64
211- tar -xzf artifacts/log2src-${{ github.ref_name }}-macos-x64/log2src-${{ github.ref_name }}-macos-x64.tar.gz -C editors/code/bin/darwin-x64
212- tar -xzf artifacts/log2src-${{ github.ref_name }}-macos-arm64/log2src-${{ github.ref_name }}-macos-arm64.tar.gz -C editors/code/bin/darwin-arm64
213- unzip -o artifacts/log2src-${{ github.ref_name }}-windows-x64/log2src-${{ github.ref_name }}-windows-x64.zip -d editors/code/bin/win-x64
225+ rm -rf editors/code/bin
226+ mkdir -p "editors/code/bin/${{ matrix.target }}"
227+ if [[ "${{ matrix.target }}" == "win32-x64" ]]; then
228+ unzip -o "artifacts/${{ matrix.artifact }}/${{ matrix.artifact }}.zip" -d "editors/code/bin/${{ matrix.target }}"
229+ else
230+ tar -xzf "artifacts/${{ matrix.artifact }}/${{ matrix.artifact }}.tar.gz" -C "editors/code/bin/${{ matrix.target }}"
231+ fi
214232
215233 - name : Cache VS Code test runtime
216234 uses : actions/cache@v4
@@ -246,17 +264,16 @@ jobs:
246264 run : |
247265 REF_NAME="${{ github.ref_name }}"
248266 VERSION=${REF_NAME#v}
249- # Update version in package.json
250267 jq '.version = "'$VERSION'"' package.json > package.json.new
251268 mv package.json.new package.json
252- pnpm vsce package --no-dependencies
269+ pnpm vsce package --no-dependencies --target ${{ matrix.vsce-target }}
253270
254271 - name : Upload VS Code extension
255272 if : startsWith(github.ref, 'refs/tags/')
256273 uses : actions/upload-artifact@v4
257274 with :
258- name : log2src-ext-${{ github.ref_name }}.vsix
259- path : editors/code/log2src-ext- *.vsix
275+ name : log2src-ext-${{ github.ref_name }}-${{ matrix.target }} .vsix
276+ path : editors/code/*.vsix
260277 if-no-files-found : error
261278
262279 release :
0 commit comments