Skip to content

Commit bb85a92

Browse files
committed
🤖 ci: add Windows build to PR/merge queue and code signing to releases
- Add Windows build job to build.yml (runs on PRs and merge queue) - Add Windows code signing setup to release.yml (mirrors Mac signing pattern) - Uses WINDOWS_CERTIFICATE and WINDOWS_CERTIFICATE_PWD secrets _Generated with `mux`_
1 parent 1fc5493 commit bb85a92

File tree

2 files changed

+52
-0
lines changed

2 files changed

+52
-0
lines changed

.github/workflows/build.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,42 @@ jobs:
6464
retention-days: 30
6565
if-no-files-found: error
6666

67+
build-windows:
68+
name: Build Windows
69+
runs-on: windows-latest
70+
steps:
71+
- name: Checkout code
72+
uses: actions/checkout@v4
73+
with:
74+
fetch-depth: 0 # Required for git describe to find tags
75+
76+
- uses: ./.github/actions/setup-mux
77+
78+
- name: Install GNU Make (for build)
79+
run: choco install -y make
80+
81+
- name: Verify tools
82+
shell: bash
83+
run: |
84+
make --version
85+
bun --version
86+
magick --version | head -1
87+
88+
- name: Build application
89+
run: bun run build
90+
91+
# No code signing - releases use release.yml (triggered by tag publish).
92+
- name: Package for Windows
93+
run: make dist-win
94+
95+
- name: Upload Windows exe
96+
uses: actions/upload-artifact@v4
97+
with:
98+
name: windows-exe
99+
path: release/*.exe
100+
retention-days: 30
101+
if-no-files-found: error
102+
67103
build-vscode-extension:
68104
name: Build VS Code Extension
69105
runs-on: ${{ github.repository_owner == 'coder' && 'depot-ubuntu-22.04-16' || 'ubuntu-latest' }}

.github/workflows/release.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,22 @@ jobs:
168168
- name: Build application
169169
run: bun run build
170170

171+
- name: Setup code signing
172+
shell: bash
173+
run: |
174+
if [ -n "$WINDOWS_CERTIFICATE" ]; then
175+
echo "Setting up Windows code signing certificate..."
176+
echo "$WINDOWS_CERTIFICATE" | base64 -d > /tmp/certificate.pfx
177+
echo "CSC_LINK=/tmp/certificate.pfx" >> "$GITHUB_ENV"
178+
echo "CSC_KEY_PASSWORD=$WINDOWS_CERTIFICATE_PWD" >> "$GITHUB_ENV"
179+
echo "✅ Windows code signing configured"
180+
else
181+
echo "⚠️ No Windows code signing certificate provided - building unsigned"
182+
fi
183+
env:
184+
WINDOWS_CERTIFICATE: ${{ secrets.WINDOWS_CERTIFICATE }}
185+
WINDOWS_CERTIFICATE_PWD: ${{ secrets.WINDOWS_CERTIFICATE_PWD }}
186+
171187
- name: Package and publish for Windows (.exe)
172188
run: bun x electron-builder --win --publish always
173189
env:

0 commit comments

Comments
 (0)