Skip to content

🛠️ Bump actions/upload-artifact from 5 to 6 #1106

🛠️ Bump actions/upload-artifact from 5 to 6

🛠️ Bump actions/upload-artifact from 5 to 6 #1106

Workflow file for this run

name: windows
on:
push:
branches:
- main
tags:
- '[0-9]+.[0-9]+.[0-9]+'
pull_request:
types: [opened, synchronize]
jobs:
windows-build:
runs-on: ${{ matrix.windows-version }}
strategy:
fail-fast: false
matrix:
windows-version:
- 'windows-latest'
env:
CXXFLAGS: /MP
steps:
- name: Sync repository
uses: actions/checkout@v6
- name: Install Conan
uses: conan-io/setup-conan@v1
with:
cache_packages: true
- name: Install Qt
uses: jurplel/install-qt-action@v4
with:
version: '5.15.2'
arch: 'win64_msvc2019_64'
dir: '${{ github.workspace }}/qt_installation/'
cache: 'true'
tools: 'tools_ifw'
add-tools-to-path: 'true'
- name: Conan install
shell: pwsh
run: |
conan install . -of build --build=missing -pr:b=default -s build_type=Release -s compiler.cppstd=17
- name: Build Plotjuggler
shell: pwsh
run: |
cmake --preset conan-default -S . -B build -DCMAKE_BUILD_TYPE=Release -DPJ_INSTALLATION="windows"
cmake --build build --config Release
- name: Prepare installer directory
shell: pwsh
run: |
New-Item -ItemType Directory -Force -Path installer\io.plotjuggler.application\data
Copy-Item -Path build\bin\Release\*.* -Destination installer\io.plotjuggler.application\data -Recurse -Force
windeployqt.exe --release installer\io.plotjuggler.application\data\plotjuggler.exe
- name: Create installer using QT Installation Framework
id: create_installer
shell: pwsh
run: |
# Get version from tag or use default
$version = if ($env:GITHUB_REF -match "refs/tags/([0-9]+\.[0-9]+\.[0-9]+)") { $matches[1] } else { "dev" }
$installer_name = "PlotJuggler-$version-Windows-x64.exe"
# Find binarycreator executable
$binarycreator = Get-ChildItem -Path "${{ github.workspace }}\qt_installation" -Recurse -Name "binarycreator.exe" | Select-Object -First 1
if (-not $binarycreator) {
Write-Error "binarycreator.exe not found in Qt installation"
exit 1
}
$binarycreator_path = Join-Path "${{ github.workspace }}\qt_installation" $binarycreator
# Create installer using existing configuration files
Write-Host "Creating installer: $installer_name"
& "$binarycreator_path" --offline-only -c installer\config.xml -p installer $installer_name
if ($LASTEXITCODE -ne 0) {
Write-Error "Failed to create installer"
exit 1
}
# Set output for upload step
"installer_name=$installer_name" >> $env:GITHUB_OUTPUT
Write-Host "Installer created successfully: $installer_name"
- name: Upload installer
uses: actions/upload-artifact@v6
with:
name: ${{ steps.create_installer.outputs.installer_name }}
path: ${{ steps.create_installer.outputs.installer_name }}
- name: Upload to Release
if: startsWith(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@v2
with:
files: ${{ steps.create_installer.outputs.installer_name }}
generate_release_notes: false
fail_on_unmatched_files: false