Skip to content

Commit dcbde4a

Browse files
SDSLeonclaude
andcommitted
ci(release): fix electron-builder path and harden Windows signing setup
- Invoke electron-builder via `pnpm exec` so the binary resolves from the workspace's node_modules/.bin (the bare command isn't on PATH in release runners). - Gate the NuGet provider install on AZURE_TENANT_ID being set, force TLS 1.2, and pin a MinimumVersion so the install works on current windows-latest images. - Build an unsigned Windows installer when Azure signing secrets are absent instead of failing the job. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 3d0cef3 commit dcbde4a

1 file changed

Lines changed: 17 additions & 4 deletions

File tree

.github/workflows/release.yml

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,15 @@ jobs:
108108
- name: Install NuGet provider (Windows signing)
109109
if: matrix.os == 'windows-latest'
110110
shell: pwsh
111-
run: Install-PackageProvider -Name NuGet -Force -Scope CurrentUser
111+
env:
112+
AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }}
113+
run: |
114+
if (-not $env:AZURE_TENANT_ID) {
115+
Write-Host "AZURE_TENANT_ID not set; skipping NuGet provider installation."
116+
exit 0
117+
}
118+
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
119+
Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force -Scope CurrentUser
112120
113121
- name: Build app
114122
run: pnpm run build
@@ -145,14 +153,19 @@ jobs:
145153
run: |
146154
if [ "${{ matrix.os }}" = "windows-latest" ]; then
147155
pnpm run prepare:package-assets
148-
electron-builder --win --config electron-builder.yml --config build/signing.yml
156+
if [ -n "$AZURE_TENANT_ID" ]; then
157+
pnpm exec electron-builder --win --config electron-builder.yml --config build/signing.yml
158+
else
159+
echo "Azure signing secrets not configured; building unsigned Windows installer."
160+
pnpm exec electron-builder --win
161+
fi
149162
else
150163
if [ "${{ matrix.os }}" = "macos-latest" ]; then
151164
pnpm run prepare:agent-plugins
152-
electron-builder --mac
165+
pnpm exec electron-builder --mac
153166
else
154167
pnpm run prepare:package-assets
155-
electron-builder --linux
168+
pnpm exec electron-builder --linux
156169
fi
157170
fi
158171
shell: bash

0 commit comments

Comments
 (0)