1515
1616permissions :
1717 contents : write
18+ actions : read
1819
1920jobs :
2021 release :
@@ -32,31 +33,19 @@ jobs:
3233
3334 steps :
3435 - name : Checkout code
35- uses : actions/checkout@v4
36+ uses : actions/checkout@v6
3637 with :
3738 fetch-depth : 0
3839
39- - name : Setup Node.js
40- uses : actions/setup-node@v4
41- with :
42- node-version : ' 20'
43-
4440 - name : Setup pnpm
4541 uses : pnpm/action-setup@v4
46-
47- - name : Get pnpm store directory
48- shell : bash
49- run : |
50- echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
51-
52- - name : Setup pnpm cache
53- uses : actions/cache@v4
42+
43+ - name : Setup Node.js
44+ uses : actions/setup-node@v6
5445 with :
55- path : ${{ env.STORE_PATH }}
56- key : ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
57- restore-keys : |
58- ${{ runner.os }}-pnpm-store-
59-
46+ node-version : ' 24'
47+ cache : ' pnpm'
48+
6049 - name : Install dependencies
6150 run : pnpm install
6251
7665 - name : Build macOS
7766 if : matrix.platform == 'mac'
7867 env :
79- GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
8068 # Code signing
8169 CSC_LINK : ${{ secrets.MAC_CERTS }}
8270 CSC_KEY_PASSWORD : ${{ secrets.MAC_CERTS_PASSWORD }}
@@ -94,18 +82,46 @@ jobs:
9482 # Windows specific steps
9583 - name : Build Windows
9684 if : matrix.platform == 'win'
97- env :
98- GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
99- # For code signing (optional)
100- # CSC_LINK: ${{ secrets.WIN_CERTS }}
101- # CSC_KEY_PASSWORD: ${{ secrets.WIN_CERTS_PASSWORD }}
10285 run : pnpm run package:win
10386
87+ - name : Upload unsigned Windows artifacts for SignPath
88+ if : matrix.platform == 'win'
89+ id : upload-unsigned-windows-artifact
90+ uses : actions/upload-artifact@v4
91+ with :
92+ name : unsigned-win-exe-${{ github.run_id }}-${{ github.run_attempt }}
93+ path : release/*.exe
94+ retention-days : 1
95+
96+ - name : Sign Windows artifacts via SignPath
97+ if : matrix.platform == 'win'
98+ id : signpath-sign-windows
99+ uses : signpath/github-action-submit-signing-request@v2
100+ with :
101+ api-token : ${{ secrets.SIGNPATH_API_TOKEN }}
102+ organization-id : " c120e8c0-b9a7-4615-abd7-b131436e366f"
103+ project-slug : " valuecell"
104+ signing-policy-slug : " test-signing"
105+ github-artifact-id : ${{ steps.upload-unsigned-windows-artifact.outputs.artifact-id }}
106+ wait-for-completion : true
107+ output-artifact-directory : release/signed
108+
109+ - name : Replace unsigned executables with signed ones
110+ if : matrix.platform == 'win'
111+ shell : pwsh
112+ run : |
113+ $signedExeFiles = Get-ChildItem -Path "release/signed" -Filter *.exe -File -Recurse
114+ if (-not $signedExeFiles) {
115+ throw "No signed .exe files found in release/signed"
116+ }
117+ foreach ($file in $signedExeFiles) {
118+ Copy-Item -Path $file.FullName -Destination "release/$($file.Name)" -Force
119+ }
120+ Write-Host "Signed executables copied to release/"
121+
104122 # Linux specific steps
105123 - name : Build Linux
106124 if : matrix.platform == 'linux'
107- env :
108- GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
109125 run : pnpm run package:linux
110126
111127 - name : Upload artifacts
@@ -133,10 +149,11 @@ jobs:
133149 - name : Checkout code
134150 uses : actions/checkout@v4
135151
136- - name : Download all artifacts
152+ - name : Download release artifacts only
137153 uses : actions/download-artifact@v4
138154 with :
139155 path : release-artifacts
156+ pattern : release-*
140157
141158 - name : List all downloaded artifacts
142159 run : |
@@ -222,10 +239,11 @@ jobs:
222239 - name : Checkout code
223240 uses : actions/checkout@v4
224241
225- - name : Download all artifacts
242+ - name : Download release artifacts only
226243 uses : actions/download-artifact@v4
227244 with :
228245 path : release-artifacts
246+ pattern : release-*
229247
230248 - name : Extract version and channel
231249 id : version
0 commit comments