Skip to content

windows build

windows build #137

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"
# $NewVersion=$env:NEW_VERSION
# $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($NewVersion, "$NewVersion-$Suffix")
# }
- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: nzbget-windows-installers
path: build\*.exe
retention-days: 5