1+ name : Build and Test
2+
3+ on :
4+ push :
5+ branches : [ release ]
6+ pull_request :
7+ branches : [ release ]
8+
9+ jobs :
10+ build :
11+ runs-on : windows-latest
12+
13+ steps :
14+ - name : Checkout code
15+ uses : actions/checkout@v4
16+
17+ - name : Set up Python
18+ uses : actions/setup-python@v4
19+ with :
20+ python-version : ' 3.11'
21+
22+ - name : Install dependencies
23+ run : |
24+ python -m pip install --upgrade pip
25+ pip install pyinstaller
26+
27+ - name : Test imports
28+ run : |
29+ python -c "import main"
30+ python -c "from tool_version_manager import ToolVersionManager"
31+ python -c "from file_manager import FileManager"
32+ echo "All imports successful"
33+
34+ - name : Build executable
35+ run : |
36+ python build_exe.py
37+ echo "Build completed"
38+
39+ - name : List files
40+ run : |
41+ echo "Release directory:"
42+ if (Test-Path "release") {
43+ Get-ChildItem "release" -Recurse | Select-Object Name, Length
44+ echo "Release directory file count: $((Get-ChildItem "release" -Recurse).Count)"
45+ } else { echo "Release directory not found" }
46+ echo "Dist directory:"
47+ if (Test-Path "dist") {
48+ Get-ChildItem "dist" -Recurse | Select-Object Name, Length
49+ echo "Dist directory file count: $((Get-ChildItem "dist" -Recurse).Count)"
50+ } else { echo "Dist directory not found" }
51+ echo "Current working directory:"
52+ Get-Location
53+ echo "All files in current directory:"
54+ Get-ChildItem | Select-Object Name, Length
55+
56+ - name : Upload artifacts
57+ uses : actions/upload-artifact@v4
58+ with :
59+ name : IAR-Firmware-Publish-Tool
60+ path : release/*.exe
61+ retention-days : 30
0 commit comments