Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
76 changes: 47 additions & 29 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ on:

permissions:
contents: write
actions: read

jobs:
release:
Expand All @@ -32,31 +33,19 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
fetch-depth: 0

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'

- name: Setup pnpm
uses: pnpm/action-setup@v4

- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV

- name: Setup pnpm cache
uses: actions/cache@v4

- name: Setup Node.js
uses: actions/setup-node@v6
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-

node-version: '24'
cache: 'pnpm'

- name: Install dependencies
run: pnpm install

Expand All @@ -76,7 +65,6 @@ jobs:
- name: Build macOS
if: matrix.platform == 'mac'
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Code signing
CSC_LINK: ${{ secrets.MAC_CERTS }}
CSC_KEY_PASSWORD: ${{ secrets.MAC_CERTS_PASSWORD }}
Expand All @@ -94,18 +82,46 @@ jobs:
# Windows specific steps
- name: Build Windows
if: matrix.platform == 'win'
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# For code signing (optional)
# CSC_LINK: ${{ secrets.WIN_CERTS }}
# CSC_KEY_PASSWORD: ${{ secrets.WIN_CERTS_PASSWORD }}
run: pnpm run package:win

- name: Upload unsigned Windows artifacts for SignPath
if: matrix.platform == 'win'
id: upload-unsigned-windows-artifact
uses: actions/upload-artifact@v4
with:
name: unsigned-win-exe-${{ github.run_id }}-${{ github.run_attempt }}
path: release/*.exe
retention-days: 1

- name: Sign Windows artifacts via SignPath
if: matrix.platform == 'win'
id: signpath-sign-windows
uses: signpath/github-action-submit-signing-request@v2
with:
api-token: ${{ secrets.SIGNPATH_API_TOKEN }}
organization-id: "c120e8c0-b9a7-4615-abd7-b131436e366f"
project-slug: "valuecell"
signing-policy-slug: "test-signing"
github-artifact-id: ${{ steps.upload-unsigned-windows-artifact.outputs.artifact-id }}
wait-for-completion: true
output-artifact-directory: release/signed

- name: Replace unsigned executables with signed ones
if: matrix.platform == 'win'
shell: pwsh
run: |
$signedExeFiles = Get-ChildItem -Path "release/signed" -Filter *.exe -File -Recurse
if (-not $signedExeFiles) {
throw "No signed .exe files found in release/signed"
}
foreach ($file in $signedExeFiles) {
Copy-Item -Path $file.FullName -Destination "release/$($file.Name)" -Force
}
Write-Host "Signed executables copied to release/"

# Linux specific steps
- name: Build Linux
if: matrix.platform == 'linux'
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: pnpm run package:linux

- name: Upload artifacts
Expand Down Expand Up @@ -134,10 +150,11 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4

- name: Download all artifacts
- name: Download release artifacts only
uses: actions/download-artifact@v4
with:
path: release-artifacts
pattern: release-*

- name: List all downloaded artifacts
run: |
Expand Down Expand Up @@ -228,10 +245,11 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4

- name: Download all artifacts
- name: Download release artifacts only
uses: actions/download-artifact@v4
with:
path: release-artifacts
pattern: release-*

- name: Extract version and channel
id: version
Expand Down
83 changes: 83 additions & 0 deletions .github/workflows/win-build-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
name: Windows Build Test

on:
workflow_dispatch:
inputs:
version:
description: "Version for SignPath parameter (e.g., 1.0.0-test.1)"
required: false
default: "dev"

permissions:
contents: read
actions: read

jobs:
windows-build-sign:
runs-on: windows-latest

steps:
- name: Checkout code
uses: actions/checkout@v6
with:
fetch-depth: 0

- name: Setup pnpm
uses: pnpm/action-setup@v4

- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: "24"
cache: "pnpm"

- name: Install dependencies
run: pnpm install

- name: Download uv binaries for Windows
run: pnpm run uv:download:win

- name: Build Windows
run: pnpm run package:win

# Required by SignPath Trusted Build: artifact must exist on GitHub first.
- name: Upload unsigned Windows artifacts for SignPath
id: upload-unsigned-windows-artifact
uses: actions/upload-artifact@v4
with:
name: unsigned-win-exe-${{ github.run_id }}-${{ github.run_attempt }}
path: release/*.exe
retention-days: 1

- name: Sign Windows artifacts via SignPath
id: signpath-sign-windows
uses: signpath/github-action-submit-signing-request@v2
with:
api-token: ${{ secrets.SIGNPATH_API_TOKEN }}
organization-id: "c120e8c0-b9a7-4615-abd7-b131436e366f"
project-slug: "valuecell"
signing-policy-slug: "test-signing"
github-artifact-id: ${{ steps.upload-unsigned-windows-artifact.outputs.artifact-id }}
wait-for-completion: true
output-artifact-directory: release/signed

- name: Replace unsigned executables with signed ones
shell: pwsh
run: |
$signedExeFiles = Get-ChildItem -Path "release/signed" -Filter *.exe -File -Recurse
if (-not $signedExeFiles) {
throw "No signed .exe files found in release/signed"
}
foreach ($file in $signedExeFiles) {
Copy-Item -Path $file.FullName -Destination "release/$($file.Name)" -Force
}
Write-Host "Signed executables copied to release/"

- name: Upload signed Windows artifacts
uses: actions/upload-artifact@v4
with:
name: signed-win-exe-${{ github.run_id }}-${{ github.run_attempt }}
path: |
release/*.exe
release/latest*.yml
retention-days: 7
9 changes: 4 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,9 @@
"uv:download:all": "zx scripts/download-bundled-uv.mjs --all",
"icons": "zx scripts/generate-icons.mjs",
"package": "electron-builder",
"package:mac": "vite build && zx scripts/bundle-openclaw.mjs && electron-builder --mac",
"package:win": "vite build && zx scripts/bundle-openclaw.mjs && electron-builder --win",
"package:linux": "vite build && zx scripts/bundle-openclaw.mjs && electron-builder --linux",
"release": "pnpm run uv:download && vite build && electron-builder --publish always",
"package:mac": "vite build && zx scripts/bundle-openclaw.mjs && electron-builder --mac --publish never",
"package:win": "vite build && zx scripts/bundle-openclaw.mjs && electron-builder --win --publish never",
"package:linux": "vite build && zx scripts/bundle-openclaw.mjs && electron-builder --linux --publish never",
"version:patch": "pnpm version patch",
"version:minor": "pnpm version minor",
"version:major": "pnpm version major",
Expand Down Expand Up @@ -107,4 +106,4 @@
"zx": "^8.8.5"
},
"packageManager": "pnpm@10.29.2+sha512.bef43fa759d91fd2da4b319a5a0d13ef7a45bb985a3d7342058470f9d2051a3ba8674e629672654686ef9443ad13a82da2beb9eeb3e0221c87b8154fff9d74b8"
}
}