forked from irixaligned/duckstation-uwp
-
Notifications
You must be signed in to change notification settings - Fork 0
79 lines (63 loc) · 2.82 KB
/
Best-Builder.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
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\deps-x64\include\SDL2\"
Remove-Item -Path $extractFolder -Recurse -Force
Remove-Item -Path $zipFile -Force
- name: Download and extract SDL2
run: |
wget https://github.com/libsdl-org/SDL/releases/download/release-2.30.1/SDL2-2.30.1-win32-x64.zip
unzip SDL2-2.30.1-win32-x64.zip -d dep/msvc/deps-x64/include/SDL2
mv dep/msvc/deps-x64/include/SDL2/SDL2-2.30.1-win32-x64/* dep/msvc/deps-x64/include/SDL2/
rm -rf dep/msvc/deps-x64/include/SDL2/SDL2-2.30.1-win32-x64
- 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