Skip to content

windows build

windows build #147

Workflow file for this run

name: windows build
on:
workflow_call:
workflow_dispatch:
jobs:
build:
runs-on: [self-hosted, windows]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build
run: |
$BuildParams="-BuildRelease -Build32 -Build64 -BuildSetup"
If (-not ($env:GITHUB_REF_NAME -eq "main")) {
$BuildParams="$BuildParams -BuildTesting"
}
If (($env:GITHUB_REF_NAME -eq "main") -or ($env:GITHUB_REF_NAME -eq "develop")) {
$BuildParams="$BuildParams -BuildDebug"
}
Invoke-Expression "windows\build-nzbget.ps1 $BuildParams"
- name: Rename build artifacts
if: github.ref_name != 'main' && github.ref_name != 'develop'
run: |
$Output="build"
$Suffix = $env:GITHUB_REF_NAME.Replace("/","-")
ForEach ($File In Get-ChildItem -Path $Output -Filter "*.exe") {
Rename-Item -Path "$Output\$($File.Name)" -NewName $File.Name.Replace("-bin-windows-setup.exe", "-$Suffix-bin-windows-setup.exe")
}
- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: nzbget-windows-installers
path: build\*.exe
retention-days: 5