Skip to content

build: restore regular files in external deleted by mistake #5

build: restore regular files in external deleted by mistake

build: restore regular files in external deleted by mistake #5

Workflow file for this run

name: FrameBridge Release Pipeline
on:
push:
branches: [ "main" ]
workflow_dispatch:
permissions:
contents: write
jobs:
build-and-release:
runs-on: windows-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: 'recursive'
- name: Initialize Submodules
run: git submodule update --init --recursive
- name: Generate Version Number
id: version
shell: powershell
run: |
$version = "1.0.${{ github.run_number }}"
echo "VERSION=$version" >> $env:GITHUB_OUTPUT
echo "Generated version: $version"
- name: Add MSBuild to PATH
uses: microsoft/setup-msbuild@v2
- name: Build OptiScaler Core
working-directory: ${{ github.workspace }}
run: msbuild /m /p:Configuration=Release /p:Platform=x64 OptiScaler.sln /verbosity:minimal
- name: Prepare Installer Directories
shell: powershell
run: |
New-Item -ItemType Directory -Force -Path "installer\build"
New-Item -ItemType Directory -Force -Path "installer\assets\configs"
New-Item -ItemType Directory -Force -Path "installer\assets\nvidia-env"
New-Item -ItemType Directory -Force -Path "installer\assets\dlssg"
# Move MSBuild outputs
Copy-Item -Path "x64\Release\a\OptiScaler.dll" -Destination "installer\build\" -Force
Copy-Item -Path "x64\Release\a\libxess.dll" -Destination "installer\build\" -Force
Copy-Item -Path "x64\Release\a\amd_fidelityfx_*.dll" -Destination "installer\build\" -Force
Copy-Item -Path "x64\Release\a\fakenvapi.dll" -Destination "installer\build\" -Force
# Copy INI configuration
Copy-Item -Path "nvngx.ini" -Destination "installer\assets\configs\OptiScaler.ini" -Force
Copy-Item -Path "LICENSE" -Destination "installer\assets\LICENSE.rtf" -Force
Set-Content -Path "installer\assets\Intro.rtf" -Value "Welcome to FrameBridge."
- name: Download External Assets (Nukem9 & NVAPI Proxy)
shell: powershell
run: |
# Download Nukem9 DLSSG-to-FSR3
Invoke-WebRequest -Uri "https://github.com/Nukem9/dlssg-to-fsr3/releases/download/0.100/dlssg-to-fsr3-0.100.zip" -OutFile "dlssg.zip"
Expand-Archive -Path "dlssg.zip" -DestinationPath "temp_dlssg" -Force
Copy-Item -Path "temp_dlssg\*" -Destination "installer\assets\dlssg\" -Recurse -Force
# Create mock nvidia-env for installer compatibility
New-Item -ItemType File -Path "installer\assets\nvidia-env\dxgi.dll" -Force
New-Item -ItemType File -Path "installer\assets\nvidia-env\dlss-finder.bin" -Force
New-Item -ItemType File -Path "installer\assets\nvidia-env\nvapi64-proxy.dll" -Force
- name: Update Inno Setup Version
shell: powershell
run: |
$issPath = "installer\setup.iss"
$content = Get-Content $issPath
$content = $content -replace '#define MyAppVersion ".*"', '#define MyAppVersion "${{ steps.version.outputs.VERSION }}"'
Set-Content -Path $issPath -Value $content -Encoding UTF8
- name: Compile Inno Setup Installer
shell: powershell
run: |
choco install innosetup -y
# The default install path for Inno Setup 6 via chocolatey
$iscc = "C:\Program Files (x86)\Inno Setup 6\ISCC.exe"
if (-not (Test-Path $iscc)) {
$iscc = "C:\Program Files\Inno Setup 6\ISCC.exe"
}
& $iscc "installer\setup.iss" /O+
- name: Get Commit Messages for Release Notes
id: release_notes
shell: powershell
run: |
$commits = git log -1 --pretty=format:"%s%n%n%b"
$notes = "### What's New in v${{ steps.version.outputs.VERSION }}`n`n$commits`n`nAutomated release by FrameBridge CI/CD."
# Write multi-line string to GITHUB_OUTPUT correctly
$EOF = [guid]::NewGuid().ToString()
"NOTES<<$EOF" | Out-File -FilePath $env:GITHUB_OUTPUT -Append
$notes | Out-File -FilePath $env:GITHUB_OUTPUT -Append
"$EOF" | Out-File -FilePath $env:GITHUB_OUTPUT -Append
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
tag_name: v${{ steps.version.outputs.VERSION }}
name: FrameBridge v${{ steps.version.outputs.VERSION }}
body: ${{ steps.release_notes.outputs.NOTES }}
files: installer\Output\framebridge-setup-*.exe
draft: false
prerelease: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}