File tree Expand file tree Collapse file tree 1 file changed +51
-0
lines changed Expand file tree Collapse file tree 1 file changed +51
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Build LibreMonitor Executable
2+ on :
3+ push :
4+ branches : [ main ]
5+ workflow_dispatch :
6+
7+ jobs :
8+ build :
9+ runs-on : windows-latest
10+ steps :
11+ # Gets repo
12+ - name : Repo Checkout
13+ 14+
15+ - name : Python Setup
16+ uses : actions/setup-python@v4
17+ with :
18+ python-version : ' 3.11'
19+
20+ - name : Install Requirements
21+ run : |
22+ python -m pip install --upgrade pip
23+ pip install pyinstaller
24+ pip install pythonnet
25+
26+ - name : Get Latest .DLL files
27+ id : get_release
28+ run : |
29+ $response = Invoke-RestMethod -Uri "https://api.github.com/repos/LibreHardwareMonitor/LibreHardwareMonitor/releases/latest"
30+ $asset = $response.assets | Where-Object { $_.name -like "*LibreHardwareMonitor*.zip" }
31+ "zip_url=$($asset.browser_download_url)" | Out-File -FilePath $env:GITHUB_ENV -Append
32+ - name : 📥 Download and extract DLLs
33+ run : |
34+ curl -L -o LibreHardwareMonitor.zip $env:zip_url
35+ Expand-Archive -Path LibreHardwareMonitor.zip -DestinationPath libre_cli
36+
37+ - name : 🛠️ Build with PyInstaller
38+ run : |
39+ python -m PyInstaller --onefile --name "LibreMonitor" `
40+ .\libre_cli\libre_hardware_monitor_reporter.py `
41+ --add-binary ".\libre_cli\LibreHardwareMonitorLib.dll;." `
42+ --add-binary ".\libre_cli\Aga.Controls.dll;." `
43+ --add-binary ".\libre_cli\HidSharp.dll;."
44+ - name : 🏷️ Set version tag
45+ run : |
46+ echo "VERSION=$(git rev-parse --short HEAD)" >> $env:GITHUB_ENV
47+ - name : 📤 Upload artifact
48+ 49+ with :
50+ name : LibreMonitor
51+ path : dist/LibreMonitor.exe
You can’t perform that action at this time.
0 commit comments