Skip to content

Update Best-Builder.yaml #44

Update Best-Builder.yaml

Update Best-Builder.yaml #44

Workflow file for this run

name: Build for Windows
on:
push:
jobs:
build:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Install Node.js 12
uses: actions/setup-node@master
with:
node-version: '12.x'
registry-url: 'https://npm.pkg.github.com'
- name: Setup MSVC Development Environment
uses: TheMrMilchmann/[email protected]
with:
arch: x64
uwp: true
- name: Install Visual Studio 2022
run: choco install visualstudio2022buildtools-preview --pre
- name: Install Visual Studio 2022 Workloads
shell: powershell
run: ./vs2017.ps1
- name: Download and extract SDL2
shell: powershell
run: |
$url = "https://github.com/libsdl-org/SDL/releases/download/release-2.30.1/SDL2-2.30.1-win32-x64.zip"
$zipFile = "$env:TEMP\SDL2-2.30.1-win32-x64.zip"
$extractFolder = "$env:TEMP\SDL2-2.30.1-win32-x64"
Invoke-WebRequest -Uri $url -OutFile $zipFile
Expand-Archive -Path $zipFile -DestinationPath $extractFolder
Move-Item $extractFolder\* dep/msvc/include/SDL2
Remove-Item -Path $extractFolder -Recurse -Force
Remove-Item -Path $zipFile -Force
- name: Update manifest file
run: |
$version = "1.0.0.0"
$manifest = "src/duckstation-uwp/Package.appxmanifest"
$content = Get-Content $manifest
$content -replace '(?<=<Identity Name=")([^"]+)(?=" Version="[^"]+")', $version | Set-Content $manifest
shell: pwsh
- name: Use DuckStation PFX
run: echo "${{ secrets.DUCKSTATION_PFX }}" > duckstation-uwp_TemporaryKey.pfx
- name: Build DuckStation x64
run: msbuild duckstation.sln /t:Build /p:Configuration=ReleaseUWP /p:Platform=x64
- name: Sign UWP package
run: |
"C:\Program Files (x86)\Windows Kits\10\bin\10.0.19041.0\x64\SignTool.exe" sign /fd SHA256 /f duckstation-uwp_TemporaryKey.pfx /p ${{ secrets.PFX_PASSWORD }} /t http://timestamp.digicert.com/ /v *.appx
- name: Upload UWP package as artifact
uses: actions/upload-artifact@v2
with:
name: DuckStation-UWP
- name: Cleanup
run: |
Remove-Item "deps-x64.7z" -Force
Remove-Item "duckstation-uwp_TemporaryKey.pfx" -Force