Skip to content

Commit 48bf04e

Browse files
authored
ci: add builds to test workflows (#1815)
1 parent 5d25716 commit 48bf04e

File tree

8 files changed

+86
-38
lines changed

8 files changed

+86
-38
lines changed

.github/workflows/build.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Build
2+
3+
# Called from ci
4+
on:
5+
workflow_call:
6+
7+
jobs:
8+
build:
9+
name: Build
10+
strategy:
11+
fail-fast: false
12+
matrix:
13+
os:
14+
- macos-15-intel
15+
- ubuntu-latest
16+
- windows-latest
17+
arch:
18+
- x64
19+
include:
20+
- os: macos-latest
21+
arch: arm64
22+
- os: ubuntu-24.04-arm
23+
arch: armv7l
24+
runs-on: '${{ matrix.os }}'
25+
steps:
26+
- run: git config --global core.autocrlf input
27+
- name: Checkout
28+
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
29+
- name: Setup Node.js
30+
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
31+
with:
32+
node-version-file: .nvmrc
33+
cache: 'yarn'
34+
- name: Install dependencies
35+
run: yarn --immutable
36+
- run: yarn run contributors
37+
env:
38+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
39+
- run: yarn run electron-releases
40+
# Artifacts generated are unsigned
41+
- name: Run Forge makers
42+
run: yarn run make

.github/workflows/ci.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: CI
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- main
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
test:
14+
permissions:
15+
contents: read
16+
uses: ./.github/workflows/test.yml
17+
build:
18+
permissions:
19+
contents: read
20+
uses: ./.github/workflows/build.yml
21+
gha-done:
22+
name: GitHub Actions Completed
23+
runs-on: ubuntu-latest
24+
needs: [test, build]
25+
if: always() && !contains(needs.*.result, 'failure')
26+
steps:
27+
- name: GitHub Actions Jobs Done
28+
run: |
29+
echo "All GitHub Actions Jobs are done"

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
- name: Setup Node.js
4141
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
4242
with:
43-
node-version: '22.17.x'
43+
node-version-file: .nvmrc
4444
- run: yarn install --immutable
4545
- run: yarn run contributors
4646
env:

.github/workflows/test.yml

Lines changed: 3 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,9 @@
1+
# Called during ci and release
12
name: Test
23

34
on:
4-
pull_request:
5-
branches:
6-
- main
7-
push:
8-
branches:
9-
- main
105
workflow_call:
116

12-
permissions:
13-
contents: read
14-
157
jobs:
168
test:
179
name: Test
@@ -29,15 +21,15 @@ jobs:
2921
arch: arm64
3022
- os: ubuntu-24.04-arm
3123
arch: armv7l
32-
runs-on: "${{ matrix.os }}"
24+
runs-on: '${{ matrix.os }}'
3325
steps:
3426
- run: git config --global core.autocrlf input
3527
- name: Checkout
3628
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
3729
- name: Setup Node.js
3830
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
3931
with:
40-
node-version: '22.17.x'
32+
node-version-file: .nvmrc
4133
cache: 'yarn'
4234
- name: Install dependencies
4335
run: yarn --immutable
@@ -49,13 +41,3 @@ jobs:
4941
run: yarn run lint && yarn run format
5042
- name: Test
5143
run: yarn tsc && yarn test:ci
52-
53-
gha-done:
54-
name: GitHub Actions Completed
55-
runs-on: ubuntu-latest
56-
needs: [test]
57-
if: always() && !contains(needs.*.result, 'failure')
58-
steps:
59-
- name: GitHub Actions Jobs Done
60-
run: |
61-
echo "All GitHub Actions Jobs are done"

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
22
1+
22.17

forge.config.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,9 @@ const config: ForgeConfig = {
124124
noMsi: true,
125125
setupExe: `electron-fiddle-${version}-win32-${arch}-setup.exe`,
126126
setupIcon: path.resolve(iconDir, 'fiddle.ico'),
127-
signWithParams: `/sha1 ${process.env.CERT_FINGERPRINT} /tr http://timestamp.digicert.com /td SHA256 /fd SHA256`,
127+
signWithParams: process.env.CERT_FINGERPRINT
128+
? `/sha1 ${process.env.CERT_FINGERPRINT} /tr http://timestamp.digicert.com /td SHA256 /fd SHA256`
129+
: undefined,
128130
}),
129131
},
130132
{

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@
102102
"@types/enzyme-adapter-react-16": "^1.0.6",
103103
"@types/fs-extra": "^9.0.7",
104104
"@types/getos": "^3.0.1",
105-
"@types/node": "~22.10.7",
105+
"@types/node": "^22.19.1",
106106
"@types/parse-env-string": "^1.0.2",
107107
"@types/react": "^16.14.0",
108108
"@types/react-dom": "^16.9.11",

yarn.lock

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3315,12 +3315,12 @@ __metadata:
33153315
languageName: node
33163316
linkType: hard
33173317

3318-
"@types/node@npm:~22.10.7":
3319-
version: 22.10.10
3320-
resolution: "@types/node@npm:22.10.10"
3318+
"@types/node@npm:^22.19.1":
3319+
version: 22.19.1
3320+
resolution: "@types/node@npm:22.19.1"
33213321
dependencies:
3322-
undici-types: "npm:~6.20.0"
3323-
checksum: 10c0/3425772d4513cd5dbdd87c00acda088113c03a97445f84f6a89744c60a66990b56c9d3a7213d09d57b6b944ae8ff45f985565e0c1846726112588e33a22dd12b
3322+
undici-types: "npm:~6.21.0"
3323+
checksum: 10c0/6edd93aea86da740cb7872626839cd6f4a67a049d3a3a6639cb592c620ec591408a30989ab7410008d1a0b2d4985ce50f1e488e79c033e4476d3bec6833b0a2f
33243324
languageName: node
33253325
linkType: hard
33263326

@@ -6149,7 +6149,7 @@ __metadata:
61496149
"@types/enzyme-adapter-react-16": "npm:^1.0.6"
61506150
"@types/fs-extra": "npm:^9.0.7"
61516151
"@types/getos": "npm:^3.0.1"
6152-
"@types/node": "npm:~22.10.7"
6152+
"@types/node": "npm:^22.19.1"
61536153
"@types/parse-env-string": "npm:^1.0.2"
61546154
"@types/react": "npm:^16.14.0"
61556155
"@types/react-dom": "npm:^16.9.11"
@@ -14768,13 +14768,6 @@ __metadata:
1476814768
languageName: node
1476914769
linkType: hard
1477014770

14771-
"undici-types@npm:~6.20.0":
14772-
version: 6.20.0
14773-
resolution: "undici-types@npm:6.20.0"
14774-
checksum: 10c0/68e659a98898d6a836a9a59e6adf14a5d799707f5ea629433e025ac90d239f75e408e2e5ff086afc3cace26f8b26ee52155293564593fbb4a2f666af57fc59bf
14775-
languageName: node
14776-
linkType: hard
14777-
1477814771
"undici-types@npm:~6.21.0":
1477914772
version: 6.21.0
1478014773
resolution: "undici-types@npm:6.21.0"

0 commit comments

Comments
 (0)