forked from MCPJam/inspector
-
Notifications
You must be signed in to change notification settings - Fork 0
105 lines (91 loc) · 3.52 KB
/
windows-release.yml
File metadata and controls
105 lines (91 loc) · 3.52 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
name: Windows Release
on:
push:
tags:
- "v*"
workflow_dispatch:
inputs:
version:
description: "Version to release (e.g., v1.0.0)"
required: false
type: string
create_release:
description: "Create GitHub release?"
required: false
default: true
type: boolean
permissions:
contents: write
jobs:
make-windows:
runs-on: windows-latest
env:
WINDOWS_PFX_BASE64: ${{ secrets.WINDOWS_PFX_BASE64 }}
defaults:
run:
working-directory: mcpjam-inspector
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 24.14.0
- name: Install dependencies from lockfiles
run: npm run deps:ci
shell: powershell
- name: Rebuild native modules for Windows
run: |
npm rebuild esbuild --verbose
shell: powershell
- name: Restore code signing cert
if: env.WINDOWS_PFX_BASE64 != ''
shell: pwsh
run: |
$bytes = [System.Convert]::FromBase64String($env:WINDOWS_PFX_BASE64)
[IO.File]::WriteAllBytes("$env:RUNNER_TEMP\\codesign.pfx", $bytes)
- name: Build
run: npm run build
shell: powershell
- name: Make (Windows)
env:
WINDOWS_PFX_FILE: ${{ runner.temp }}\\codesign.pfx
WINDOWS_PFX_PASSWORD: ${{ secrets.WINDOWS_PFX_PASSWORD }}
run: npm run electron:make
shell: powershell
- name: Rename installer to consistent name
run: |
$setupFile = Get-ChildItem -Path "out\make" -Recurse -Name "*Setup.exe" | Select-Object -First 1
if ($setupFile) {
Copy-Item "out\make\$setupFile" "$env:GITHUB_WORKSPACE\MCPJam-Inspector-Setup.exe"
echo "SETUP_PATH=$env:GITHUB_WORKSPACE/MCPJam-Inspector-Setup.exe" >> $env:GITHUB_ENV
}
shell: powershell
- name: Upload build artifacts (if not creating release)
if: github.event_name == 'workflow_dispatch' && !inputs.create_release
uses: actions/upload-artifact@v4
with:
name: mcpjam-inspector-windows
path: |
mcpjam-inspector\out\make\**\*Setup.exe
mcpjam-inspector\out\make\**\RELEASES
mcpjam-inspector\out\make\**\*.nupkg
retention-days: 30
- name: Create GitHub Release
if: github.event_name == 'push' || (github.event_name == 'workflow_dispatch' && inputs.create_release)
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ github.event_name == 'workflow_dispatch' && (inputs.version || 'v0.9.14-manual') || github.ref_name }}
name: Release ${{ github.event_name == 'workflow_dispatch' && (inputs.version || 'v0.9.14-manual') || github.ref_name }}
draft: false
prerelease: false
files: |
${{ env.SETUP_PATH }}
mcpjam-inspector\out\make\**\RELEASES
mcpjam-inspector\out\make\**\*.nupkg
body: |
## Download for Windows
- **Windows Installer**: [MCPJam Inspector Setup.exe](https://github.com/MCPJam/inspector/releases/download/${{ github.event_name == 'workflow_dispatch' && (inputs.version || 'v0.9.14-manual') || github.ref_name }}/MCPJam-Inspector-Setup.exe)
The installer is code-signed and ready for installation on Windows.
## Auto-generated release
This release was automatically built and signed by GitHub Actions.