-
Notifications
You must be signed in to change notification settings - Fork 11
63 lines (53 loc) · 1.74 KB
/
testarch.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: Nodejs Build Test
on:
pull_request:
branches:
- main
jobs:
package:
name: Package
runs-on: ubuntu-latest
strategy:
matrix:
os: [linux, darwin, win32] # Define the platforms
arch: [x64, arm64] # Define the architectures
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: '18'
# Install npm dependencies based on the architecture
- name: Install dependencies
run: |
if [ "${{ matrix.arch }}" == "arm64" ]; then
npm_config_arch=arm64 npm install --build-from-source
else
npm_config_arch=x64 npm install --build-from-source
fi
# Run Rollup for compilation
- name: Run Rollup
run: npm run rollupci
- name: List contents of out/compiled directory (for debugging)
run: ls -R out/compiled
- name: Install vsce
run: npm install -g @vscode/vsce
- name: Package VSIX for the target platform
run: |
case "${{ matrix.os }}" in
linux) vsce package --target linux-${{ matrix.arch }} ;;
darwin) vsce package --target darwin-${{ matrix.arch }} ;;
win32) vsce package --target win32-${{ matrix.arch }} ;;
esac
- name: Capture VSIX filename
id: capture_vsix_file
run: |
VSIX_FILE=$(ls *.vsix)
echo "VSIX_FILE=$VSIX_FILE" >> $GITHUB_ENV
shell: bash
- name: Print VSIX filename
id: print_vsix_file # Renamed to be unique
run: |
echo "Generated package for platform ${{ matrix.os }} and architecture ${{ matrix.arch }}:"
ls *.vsix