Skip to content

Small trayIcon fix woring icon name #15

Small trayIcon fix woring icon name

Small trayIcon fix woring icon name #15

name: Build and Release
on:
push:
tags:
- 'v*'
jobs:
build-windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Install Qt
uses: jurplel/install-qt-action@v4
with:
version: "6.7.2"
add-tools-to-path: true
- name: Setup MSVC
uses: ilammy/msvc-dev-cmd@v1
- name: Build
run: |
mkdir build
cd build
qmake ../
nmake
- name: Remove source and object files
shell: pwsh
run: |
$buildDir = "build/release"
if (Test-Path $buildDir) {
Get-ChildItem -Path $buildDir -Include *.cpp, *.h, *.obj, *.res, *.qrc, *.qm -Recurse | Remove-Item -Force
} else {
Write-Host "Directory not found: $buildDir"
}
- name: Deploy Qt
shell: pwsh
run: |
cd build
$windeployqtPath = "D:\a\HeadsetControl-GUI\Qt\6.7.2\msvc2019_64\bin\windeployqt6.exe"
if (Test-Path $windeployqtPath) {
& $windeployqtPath `
--exclude-plugins qsvgicon,qsvg,qico,qjpeg,qgif,qnetworklistmanager,qtuiotouchplugin `
--no-opengl-sw `
--no-system-dxc-compiler `
--no-compiler-runtime `
--no-translations `
--no-system-d3d-compiler `
D:\a\HeadsetControl-GUI\HeadsetControl-GUI\build\release\HeadsetControl-GUI.exe
} else {
Write-Error "windeploygui not found at the expected path!"
exit 1
}
- name: Download ZIP from other repo
shell: pwsh
run: |
Invoke-WebRequest -Uri "https://github.com/Sapd/HeadsetControl/releases/latest/download/headsetcontrol-windows.zip" -OutFile headsetcontrol-windows.zip
Expand-Archive -Path headsetcontrol-windows.zip -DestinationPath build/release/
- name: Zip binaries folder
run: |
$zipFile = "HeadsetControl-GUI_windows_64.zip"
$folder = "build/release/"
Compress-Archive -Path $folder -DestinationPath $zipFile
shell: pwsh
- name: Upload Windows artifact
uses: actions/upload-artifact@v4
with:
name: HeadsetControl-GUI_windows_64
path: HeadsetControl-GUI_windows_64.zip
build-linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Qt
uses: jurplel/install-qt-action@v4
with:
version: "6.7.2"
host: "linux"
add-tools-to-path: true
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y build-essential libgl1-mesa-dev
- name: Build with qmake
run: |
mkdir build
cd build
qmake ../HeadsetControl-GUI.pro CONFIG+=release
make -j$(nproc)
- name: Zip binaries folder
run: |
zip build/HeadsetControl-GUI_linux_64.zip build/HeadsetControl-GUI
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: HeadsetControl-GUI_linux_64
path: build/HeadsetControl-GUI_linux_64.zip
create-release:
needs: [build-linux, build-windows]
runs-on: ubuntu-latest
steps:
- name: Download Linux artifact
uses: actions/download-artifact@v4
with:
name: HeadsetControl-GUI_linux_64
- name: Download Windows artifact
uses: actions/download-artifact@v4
with:
name: HeadsetControl-GUI_windows_64
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false
- name: Upload Linux Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./HeadsetControl-GUI_linux_64.zip
asset_name: HeadsetControl-GUI_linux_64.zip
asset_content_type: application/octet-stream
- name: Upload Windows Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./HeadsetControl-GUI_windows_64.zip
asset_name: HeadsetControl-GUI_windows_64.zip
asset_content_type: application/octet-stream