-
-
Notifications
You must be signed in to change notification settings - Fork 190
148 lines (130 loc) · 4.73 KB
/
Copy pathrelease.yml
File metadata and controls
148 lines (130 loc) · 4.73 KB
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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
name: Create Release
on:
workflow_dispatch:
permissions:
contents: read
jobs:
build:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '9.0.x'
- name: Extract Version
run: |
$content = Get-Content "CHANGELOG.md" -Raw
if ($content -match "#### Version\s+([\d.]+)") {
$version = $matches[1]
Write-Host "Version: $version"
echo "VERSION=$version" >> $env:GITHUB_ENV
} else {
Write-Error "Could not find version in CHANGELOG.md"
exit 1
}
- name: Clean
run: dotnet clean
- name: Publish WPF App
run: |
dotnet publish Wabbajack.App.Wpf\Wabbajack.App.Wpf.csproj `
--framework "net9.0-windows" `
--runtime win-x64 `
--configuration Release `
/p:Platform=x64 `
-o publish\app `
/p:IncludeNativeLibrariesForSelfExtract=true `
--self-contained `
/p:DebugType=embedded
- name: Publish Launcher
run: |
dotnet publish Wabbajack.Launcher\Wabbajack.Launcher.csproj `
--framework "net9.0-windows" `
--runtime win-x64 `
--configuration Release `
/p:Platform=x64 `
-o publish\launcher `
/p:PublishSingleFile=true `
/p:IncludeNativeLibrariesForSelfExtract=true `
--self-contained `
/p:DebugType=embedded
- name: Publish CLI
run: |
dotnet publish Wabbajack.CLI\Wabbajack.CLI.csproj `
--framework "net9.0" `
--runtime win-x64 `
--configuration Release `
/p:Platform=x64 `
-o publish\app\cli `
/p:IncludeNativeLibrariesForSelfExtract=true `
--self-contained `
/p:DebugType=embedded
# Install SignPath PowerShell module
- name: Install SignPath Module
shell: pwsh
run: Install-Module -Name SignPath -Force -Scope CurrentUser
# Sign the executables using SignPath PowerShell module
- name: Sign Wabbajack.exe (Main App)
shell: pwsh
env:
SIGNPATH_API_TOKEN: ${{ secrets.SIGNPATH_API_KEY }}
SIGNPATH_ORG_ID: ${{ secrets.SIGNPATH_ORG_ID }}
run: |
Submit-SigningRequest `
-InputArtifactPath "publish\app\Wabbajack.exe" `
-ApiToken $env:SIGNPATH_API_TOKEN `
-OrganizationId $env:SIGNPATH_ORG_ID `
-ProjectSlug "wabbajack" `
-SigningPolicySlug "test-signing" `
-OutputArtifactPath "publish\app\Wabbajack.exe" `
-WaitForCompletion `
-Force
- name: Sign wabbajack-cli.exe
shell: pwsh
env:
SIGNPATH_API_TOKEN: ${{ secrets.SIGNPATH_API_KEY }}
SIGNPATH_ORG_ID: ${{ secrets.SIGNPATH_ORG_ID }}
run: |
Submit-SigningRequest `
-InputArtifactPath "publish\app\cli\wabbajack-cli.exe" `
-ApiToken $env:SIGNPATH_API_TOKEN `
-OrganizationId $env:SIGNPATH_ORG_ID `
-ProjectSlug "wabbajack" `
-SigningPolicySlug "test-signing" `
-OutputArtifactPath "publish\app\cli\wabbajack-cli.exe" `
-WaitForCompletion `
-Force
- name: Sign Wabbajack.exe (Launcher)
shell: pwsh
env:
SIGNPATH_API_TOKEN: ${{ secrets.SIGNPATH_API_KEY }}
SIGNPATH_ORG_ID: ${{ secrets.SIGNPATH_ORG_ID }}
run: |
Submit-SigningRequest `
-InputArtifactPath "publish\launcher\Wabbajack.exe" `
-ApiToken $env:SIGNPATH_API_TOKEN `
-OrganizationId $env:SIGNPATH_ORG_ID `
-ProjectSlug "wabbajack" `
-SigningPolicySlug "test-signing" `
-OutputArtifactPath "publish\launcher\Wabbajack.exe" `
-WaitForCompletion `
-Force
- name: Create App ZIP
run: |
& "C:\Program Files\7-Zip\7z.exe" a publish\wabbajack-${{ env.VERSION }}.zip publish\app\*
- name: Create Launcher ZIP
run: |
& "C:\Program Files\7-Zip\7z.exe" a publish\wabbajack-launcher-${{ env.VERSION }}.zip publish\launcher\*
- name: Upload App Artifact
uses: actions/upload-artifact@v4
with:
name: wabbajack-app
path: publish\wabbajack-${{ env.VERSION }}.zip
retention-days: 30
- name: Upload Launcher Artifact
uses: actions/upload-artifact@v4
with:
name: wabbajack-launcher
path: publish\wabbajack-launcher-${{ env.VERSION }}.zip
retention-days: 30