Skip to content

Commit 6d57ca8

Browse files
committed
start of automatic builds for WJ
1 parent bcab9b1 commit 6d57ca8

1 file changed

Lines changed: 84 additions & 8 deletions

File tree

.github/workflows/release.yml

Lines changed: 84 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,94 @@
1-
name: Create Release (Windows)
1+
name: Create Release
2+
23
on:
34
workflow_dispatch:
45

6+
permissions:
7+
contents: read
8+
59
jobs:
610
build:
7-
8-
runs-on: release-builder
11+
runs-on: windows-latest
912

1013
steps:
11-
- uses: actions/checkout@v3
14+
- name: Checkout
15+
uses: actions/checkout@v4
16+
1217
- name: Setup .NET
13-
uses: actions/setup-dotnet@v1
18+
uses: actions/setup-dotnet@v4
1419
with:
15-
dotnet-version: 6.0.x
16-
- name: Build
20+
dotnet-version: '9.0.x'
21+
22+
- name: Extract Version
23+
run: |
24+
$content = Get-Content "CHANGELOG.md" -Raw
25+
if ($content -match "#### Version\s+([\d.]+)") {
26+
$version = $matches[1]
27+
Write-Host "Version: $version"
28+
echo "VERSION=$version" >> $env:GITHUB_ENV
29+
} else {
30+
Write-Error "Could not find version in CHANGELOG.md"
31+
exit 1
32+
}
33+
34+
- name: Clean
35+
run: dotnet clean
36+
37+
- name: Publish WPF App
38+
run: |
39+
dotnet publish Wabbajack.App.Wpf\Wabbajack.App.Wpf.csproj `
40+
--framework "net9.0-windows" `
41+
--runtime win-x64 `
42+
--configuration Release `
43+
/p:Platform=x64 `
44+
-o publish\app `
45+
/p:IncludeNativeLibrariesForSelfExtract=true `
46+
--self-contained `
47+
/p:DebugType=embedded
48+
49+
- name: Publish Launcher
1750
run: |
18-
./buildall.bat
51+
dotnet publish Wabbajack.Launcher\Wabbajack.Launcher.csproj `
52+
--framework "net9.0-windows" `
53+
--runtime win-x64 `
54+
--configuration Release `
55+
/p:Platform=x64 `
56+
-o publish\launcher `
57+
/p:PublishSingleFile=true `
58+
/p:IncludeNativeLibrariesForSelfExtract=true `
59+
--self-contained `
60+
/p:DebugType=embedded
61+
62+
- name: Publish CLI
63+
run: |
64+
dotnet publish Wabbajack.CLI\Wabbajack.CLI.csproj `
65+
--framework "net9.0" `
66+
--runtime win-x64 `
67+
--configuration Release `
68+
/p:Platform=x64 `
69+
-o publish\app\cli `
70+
/p:IncludeNativeLibrariesForSelfExtract=true `
71+
--self-contained `
72+
/p:DebugType=embedded
73+
74+
- name: Create App ZIP
75+
run: |
76+
& "C:\Program Files\7-Zip\7z.exe" a publish\wabbajack-${{ env.VERSION }}.zip publish\app\*
77+
78+
- name: Create Launcher ZIP
79+
run: |
80+
& "C:\Program Files\7-Zip\7z.exe" a publish\wabbajack-launcher-${{ env.VERSION }}.zip publish\launcher\*
81+
82+
- name: Upload App Artifact
83+
uses: actions/upload-artifact@v4
84+
with:
85+
name: wabbajack-app
86+
path: publish\wabbajack-${{ env.VERSION }}.zip
87+
retention-days: 30
88+
89+
- name: Upload Launcher Artifact
90+
uses: actions/upload-artifact@v4
91+
with:
92+
name: wabbajack-launcher
93+
path: publish\wabbajack-launcher-${{ env.VERSION }}.zip
94+
retention-days: 30

0 commit comments

Comments
 (0)