-
Notifications
You must be signed in to change notification settings - Fork 0
84 lines (70 loc) · 2.27 KB
/
build.yml
File metadata and controls
84 lines (70 loc) · 2.27 KB
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
name: Build and Test
on:
push:
branches: [ main, ericoding-fork ]
pull_request:
branches: [ main ]
workflow_dispatch:
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
node-version: [22.x]
fail-fast: false
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- name: Install dependencies
run: |
npm install
npm install -g @vscode/vsce
- name: Rebuild native modules
run: |
npm rebuild --unsafe-perm
- name: Compile TypeScript
run: |
npm run compile || echo "Compile completed with warnings"
- name: Verify build before packaging
run: |
npm run verify
- name: Package extension
run: |
vsce package --skip-license
- name: Verify VSIX contents
run: |
echo "VSIX file contents (first 30 entries):"
unzip -l *.vsix | head -30
echo ""
echo "Checking for required dependencies in VSIX:"
unzip -l *.vsix | grep -E "(node_modules/serialport|node_modules/@serialport|node_modules/fs-extra)" || echo "⚠️ Dependencies not found in VSIX"
echo ""
echo "VSIX file size:"
ls -lh *.vsix
- name: Upload VSIX artifact
if: success()
uses: actions/upload-artifact@v4
with:
name: mpy-studio-vsix-${{ github.sha }}
path: '*.vsix'
retention-days: 30
- name: Create build info
if: matrix.os == 'ubuntu-latest' && matrix.node-version == '22.x'
run: |
echo "Build completed at $(date)" > build-info.txt
echo "Commit: ${{ github.sha }}" >> build-info.txt
echo "Branch: ${{ github.ref_name }}" >> build-info.txt
echo "Node version: ${{ matrix.node-version }}" >> build-info.txt
- name: Upload build info
if: matrix.os == 'ubuntu-latest' && matrix.node-version == '22.x'
uses: actions/upload-artifact@v4
with:
name: build-info-${{ github.sha }}
path: build-info.txt
retention-days: 7