Merge branch 'develop' #200
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Artifacts | |
on: | |
push: | |
branches-ignore: | |
- main | |
tags: | |
- v* | |
defaults: | |
run: | |
shell: powershell | |
jobs: | |
release: | |
name: Make artifacts | |
runs-on: windows-2022 | |
steps: | |
- name: Set Short Sha | |
run: | | |
echo "git_sha=$('${{github.sha}}'.Substring(0, 7))" >> $env:GITHUB_ENV | |
- name: Set Version Information - Main | |
if: ${{startsWith(github.ref, 'refs/tags/v')}} | |
run: | | |
echo "pbom_version=$('${{github.ref}}' -replace 'refs/tags/v','')" >> $env:GITHUB_ENV | |
echo "pbom_build_number=${{github.run_number}} (${{env.git_sha}})" >> $env:GITHUB_ENV | |
echo "pbom_installer_version=$('${{github.ref}}' -replace 'refs/tags/v','')" >> $env:GITHUB_ENV | |
echo "pbom_msix_version=$('${{github.ref}}.${{github.run_number}}' -replace 'refs/tags/v','')" >> $env:GITHUB_ENV | |
- name: Set Version Information - Branch | |
if: ${{startsWith(github.ref, 'refs/heads/')}} | |
run: | | |
echo "pbom_version=$('${{github.ref}}' -replace 'refs/heads/','' -replace '[^\w\d]','_')" >> $env:GITHUB_ENV | |
echo "pbom_build_number=${{github.run_number}} (${{env.git_sha}})" >> $env:GITHUB_ENV | |
echo "pbom_installer_version=0.0.${{github.run_number}}" >> $env:GITHUB_ENV | |
echo "pbom_msix_version=0.0.0.${{github.run_number}}" >> $env:GITHUB_ENV | |
- name: Install MSVC 2022 | |
uses: ilammy/msvc-dev-cmd@v1 | |
with: | |
arch: x64 | |
- name: Install Qt6 | |
uses: jurplel/install-qt-action@v3 | |
with: | |
version: '6.6.1' | |
host: windows | |
target: desktop | |
arch: win64_msvc2019_64 | |
dir: ${{github.workspace}} | |
tools: tools_opensslv3_x64 | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
path: code | |
submodules: true | |
- name: CMake Cache | |
run: | | |
cmake -S ${{github.workspace}}\code\ -B ${{github.workspace}}\_build\ ` | |
-G Ninja -DCMAKE_BUILD_TYPE=Release ` | |
-DPBOM_BUILD_NUMBER:STRING="${{env.pbom_build_number}}" ` | |
-DPBOM_VERSION:STRING="${{env.pbom_version}}" | |
- name: CMake Build | |
run: cmake --build ${{github.workspace}}\_build\ | |
- name: CMake Install | |
run: | | |
cmake --install ${{github.workspace}}\_build\ --prefix "${{github.workspace}}\_install\" | |
mkdir ${{github.workspace}}\_artifacts\ | |
cp -Path ${{github.workspace}}\_install\bin -Destination "${{github.workspace}}\_artifacts\" -Recurse | |
mv -Path ${{github.workspace}}\_artifacts\bin -Destination "${{github.workspace}}\_artifacts\PBO Manager" | |
- name: Upload binaries | |
uses: actions/upload-artifact@v4 | |
with: | |
name: PBOManager-binaries-${{env.pbom_version}}-${{env.pbom_build_number}} | |
path: ${{github.workspace}}\_artifacts\ | |
- name: Build installer | |
run: | | |
$env:Path=$env:Path + ";C:\Program Files (x86)\WiX Toolset v3.11\bin" | |
candle.exe -dArtifactsFolder=${{github.workspace}}\_install\bin\ -dProductVersion="${{env.pbom_installer_version}}" -out ${{github.workspace}}\_artifacts\PBOManager.wixobj ${{github.workspace}}\code\installer\PBOManager.wxs | |
light.exe -ext WixUIExtension -dWixUILicenseRtf=${{github.workspace}}\code\LICENSE.rtf -out ${{github.workspace}}\_artifacts\PBOManager.${{env.pbom_installer_version}}.msi ${{github.workspace}}\_artifacts\PBOManager.wixobj | |
- name: Upload installer | |
uses: actions/upload-artifact@v4 | |
with: | |
name: PBOManager-installer-${{env.pbom_version}}-${{env.pbom_build_number}} | |
path: ${{github.workspace}}\_artifacts\PBOManager.${{env.pbom_installer_version}}.msi | |
- name: Build MSIX package | |
run: | | |
$env:PATH = $env:PATH + ";C:\Program Files (x86)\Windows Kits\10\bin\10.0.19041.0\x64" | |
cp -Path ${{github.workspace}}\code\msix\package\ -Destination ${{github.workspace}}\_msix\ -Recurse | |
makepri.exe new /of ${{github.workspace}}\_msix\resources.pri /mn ${{github.workspace}}\code\msix\AppxManifest.xml /pr ${{github.workspace}}\_msix\ /cf ${{github.workspace}}\code\msix\priconfig.xml | |
(Get-Content ${{github.workspace}}\code\msix\AppxManifest.xml).Replace('Version="1.0.0.0"', 'Version="${{env.pbom_msix_version}}"') | Set-Content ${{github.workspace}}\_msix\AppxManifest.xml | |
cp -Path ${{github.workspace}}\_install\bin\* -Destination ${{github.workspace}}\_msix\ -Recurse | |
makeappx.exe pack /d ${{github.workspace}}\_msix\ /p ${{github.workspace}}\_artifacts\PBOManager.${{env.pbom_msix_version}}.msix | |
- name: Upload MSIX package | |
uses: actions/upload-artifact@v4 | |
with: | |
name: PBOManager-msix-${{env.pbom_version}}-${{env.pbom_build_number}} | |
path: ${{github.workspace}}\_artifacts\PBOManager.${{env.pbom_msix_version}}.msix |