Skip to content

Commit 3c64ce7

Browse files
committedJul 26, 2023
ci: add esigner script
1 parent 4798288 commit 3c64ce7

File tree

8 files changed

+131
-71
lines changed

8 files changed

+131
-71
lines changed
 

‎.eslintignore

+3-1
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,6 @@ npm-debug.log.*
3131
# eslint ignores hidden directories by default:
3232
# https://github.com/eslint/eslint/issues/8429
3333
.erb
34-
.eslintrc.js
34+
.eslintrc.js
35+
36+
sign.js

‎.github/workflows/release.yaml renamed to ‎.github/workflows/mac-release.yaml

+1-6
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,7 @@ on:
77

88
jobs:
99
publish:
10-
runs-on: ${{ matrix.os }}
11-
12-
strategy:
13-
matrix:
14-
os: [macos-latest, windows-2022]
15-
10+
runs-on: macos-latest
1611
steps:
1712
- name: Checkout git repo
1813
uses: actions/checkout@v3

‎.github/workflows/win-release.yaml

+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Publish
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v[0-9]+.[0-9]+.[0-9]+'
7+
8+
jobs:
9+
publish:
10+
runs-on: windows-latest
11+
12+
steps:
13+
- name: Checkout git repo
14+
uses: actions/checkout@v3
15+
16+
- name: Install Node and NPM
17+
uses: actions/setup-node@v3
18+
with:
19+
node-version: 16
20+
cache: npm
21+
22+
- name: Download eSigner Signing Tool
23+
run: Invoke-WebRequest -OutFile esigner.zip -Uri https://invisal.s3.ap-southeast-1.amazonaws.com/CodeSignTool-v1.2.7-windows.zip
24+
25+
- name: Unpack eSigner Signing Tool
26+
run: Expand-Archive esigner.zip ./CodeSignTool-v1.2.7-windows
27+
28+
- name: Install and build
29+
run: |
30+
npm install
31+
npm run postinstall
32+
npm run build
33+
34+
- name: Publish releases
35+
env:
36+
# These values are used for auto updates signing
37+
WINDOWS_SIGN_USER_NAME: ${{ secrets.WINDOWS_SIGN_USER_NAME }}
38+
WINDOWS_SIGN_USER_PASSWORD: ${{ secrets.WINDOWS_SIGN_USER_PASSWORD }}
39+
WINDOWS_SIGN_CREDENTIAL_ID: ${{ secrets.WINDOWS_SIGN_CREDENTIAL_ID }}
40+
WINDOWS_SIGN_USER_TOTP: ${{ secrets.WINDOWS_SIGN_USER_TOTP }}
41+
42+
# This is used for uploading release assets to github
43+
GH_TOKEN: ${{ secrets.RELEASE_TOKEN }}
44+
run: |
45+
npm exec electron-builder -- --publish always

‎package-lock.json

+32-64
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎package.json

+4
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,10 @@
193193
]
194194
},
195195
"win": {
196+
"signingHashAlgorithms": [
197+
"sha256"
198+
],
199+
"sign": "./sign.js",
196200
"target": [
197201
"nsis",
198202
"portable"

‎release/temp/.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
*
2+
!.gitignore

0 commit comments

Comments
 (0)
Please sign in to comment.