Skip to content

Get Textures from SDK #111

Get Textures from SDK

Get Textures from SDK #111

Workflow file for this run

name: CMake Build and Release
on:
pull_request:
types: [ opened, synchronize, reopened ]
push:
tags:
- 'v*.*.*'
jobs:
validate_build:
name: Validate Build
runs-on: windows-latest
strategy:
matrix:
config: [ debug, release ]
steps:
- name: Set up CMake
uses: lukka/get-cmake@latest
with:
cmakeVersion: "~3.30.0"
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Setup VS environment
uses: ilammy/msvc-dev-cmd@v1
with:
arch: x64
- name: Build ${{ matrix.config }}
run: |
cmake --preset x64-${{ matrix.config }}
cmake --build --preset x64-${{ matrix.config }} -j12
- name: Upload Release Build Artifact
if: matrix.config == 'release'
uses: actions/upload-artifact@v4
with:
name: release-build
path: build/x64-release/
create_release:
name: Create Release with MSI
runs-on: windows-latest
if: startsWith(github.ref, 'refs/tags/v')
needs: validate_build
permissions:
contents: write
steps:
- name: Set up CMake
uses: lukka/get-cmake@latest
with:
cmakeVersion: "~3.30.0"
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Setup VS environment
uses: ilammy/msvc-dev-cmd@v1
with:
arch: x64
- name: Install WiX v6 Toolset from MSI
shell: pwsh
run: |
$wix_version = "6.0.2"
$msi_url = "https://github.com/wixtoolset/wix/releases/download/v${wix_version}/wix-cli-x64.msi"
$msi_path = "wix.msi"
Write-Host "Downloading WiX v$($wix_version) from $msi_url"
Invoke-WebRequest -Uri $msi_url -OutFile $msi_path
Write-Host "Installing WiX from $msi_path..."
Start-Process msiexec.exe -ArgumentList "/i `"$msi_path`" /quiet" -Wait
- name: Download Release Build Artifact
uses: actions/download-artifact@v4
with:
name: release-build
path: build/x64-release/
- name: Configure and Build Installer
shell: pwsh
run: |
cmake --preset x64-release -D BUILD_INSTALLER=ON
Write-Host "Starting the installer build..."
cmake --build build/x64-release --target installer --config Release
- name: Upload MSI to GitHub Release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: build/x64-release/NavKit.msi
asset_name: NavKit.msi
tag: ${{ github.ref }}
overwrite: true