Skip to content

Commit 4f7e7f5

Browse files
committed
Merge branch 'dev'
2 parents 9894895 + ff390ca commit 4f7e7f5

File tree

4 files changed

+134
-18
lines changed

4 files changed

+134
-18
lines changed

.github/workflows/electron.yaml

Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
name: Electron build
2+
on:
3+
push:
4+
tags:
5+
- client-*
6+
jobs:
7+
build-linux:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v3
11+
- uses: actions/setup-node@v3
12+
with:
13+
node-version: 16
14+
cache: 'yarn'
15+
- run: 'yarn'
16+
- run: yarn build-electron && yarn dist
17+
working-directory: ./client
18+
- uses: actions/upload-artifact@v3
19+
with:
20+
name: release-linux
21+
path: ./client/release/*/*.snap
22+
build-windows:
23+
runs-on: windows-latest
24+
steps:
25+
- uses: actions/checkout@v3
26+
- uses: actions/setup-node@v3
27+
with:
28+
node-version: 16
29+
cache: 'yarn'
30+
- run: 'yarn'
31+
- run: yarn build-electron && yarn dist
32+
working-directory: ./client
33+
shell: bash
34+
- uses: actions/upload-artifact@v3
35+
with:
36+
name: release-windows
37+
path: ./client/release/*/*.exe
38+
build-mac:
39+
runs-on: macos-latest
40+
env:
41+
CSC_LINK: ${{ secrets.CSC_LINK }}
42+
CSC_KEY_PASSWORD: ${{ secrets.CSC_KEY_PASSWORD }}
43+
APPLEID: ${{ secrets.APPLEID }}
44+
APPLEIDPASS: ${{ secrets.APPLEIDPASS }}
45+
APPLETEAMID: ${{ secrets.APPLETEAMID }}
46+
steps:
47+
- uses: actions/checkout@v3
48+
- uses: actions/setup-node@v3
49+
with:
50+
node-version: 16
51+
cache: 'yarn'
52+
- run: 'yarn'
53+
- run: yarn build-electron && yarn dist
54+
working-directory: ./client
55+
- uses: actions/upload-artifact@v3
56+
with:
57+
name: release-mac
58+
path: ./client/release/*/*.dmg
59+
60+
upload:
61+
runs-on: ubuntu-latest
62+
needs:
63+
- build-linux
64+
- build-mac
65+
- build-windows
66+
steps:
67+
- uses: actions/download-artifact@v3
68+
- run: |
69+
mkdir -p build
70+
cp release-mac/**/*.dmg build/
71+
cp release-linux/**/*.snap build/
72+
cp release-windows/**/*.exe build/
73+
74+
ls build
75+
- run: |
76+
export TAG=$(echo $GITHUB_REF_NAME | sed 's/client-//')
77+
echo "TAG=$TAG" >> $GITHUB_ENV
78+
- uses: manleydev/butler-publish-itchio-action@master
79+
env:
80+
BUTLER_CREDENTIALS: ${{ secrets.BUTLER_CREDENTIALS }}
81+
CHANNEL: windows
82+
ITCH_GAME: buzzwords
83+
ITCH_USER: chuckdries
84+
PACKAGE: build-windows
85+
VERSION: $TAG
86+
- uses: manleydev/butler-publish-itchio-action@master
87+
env:
88+
BUTLER_CREDENTIALS: ${{ secrets.BUTLER_CREDENTIALS }}
89+
CHANNEL: linux
90+
ITCH_GAME: buzzwords
91+
ITCH_USER: chuckdries
92+
PACKAGE: build-linux
93+
VERSION: $TAG
94+
- uses: manleydev/butler-publish-itchio-action@master
95+
env:
96+
BUTLER_CREDENTIALS: ${{ secrets.BUTLER_CREDENTIALS }}
97+
CHANNEL: osx
98+
ITCH_GAME: buzzwords
99+
ITCH_USER: chuckdries
100+
PACKAGE: build-mac
101+
VERSION: $TAG
102+
- name: Release
103+
uses: fnkr/github-action-ghr@v1
104+
if: startsWith(github.ref, 'refs/tags/')
105+
env:
106+
GHR_COMPRESS: zip
107+
GHR_PATH: build/
108+
GHR_DELETE: false
109+
GHR_REPLACE: false
110+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

client/electron-builder.json5

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,18 @@
3030
arch: ["x64"],
3131
},
3232
{
33-
target: "msi",
34-
arch: ["x64"]
35-
}
33+
target: "nsis",
34+
arch: ["x64"],
35+
},
3636
],
3737
artifactName: "${productName}_${version}_${arch}.${ext}",
3838
},
39+
nsis: {
40+
artifactName: "${productName}_${version}_${arch}_installer.${ext}",
41+
},
42+
portable: {
43+
artifactName: "${productName}_${version}_${arch}_portable.${ext}",
44+
},
3945
// nsis: {
4046
// oneClick: false,
4147
// perMachine: false,

client/package.json

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"version": "1.1.0",
2+
"version": "1.1.1",
33
"name": "buzzwords-client",
44
"productName": "Buzzwords",
55
"author": {
@@ -34,9 +34,6 @@
3434
"@react-three/postprocessing": "^2.1.2",
3535
"@reduxjs/toolkit": "^1.7.1",
3636
"@reecelucas/react-use-hotkeys": "^1.3.1",
37-
"@types/react": "^18.0.17",
38-
"@types/react-dom": "^18.0.6",
39-
"@types/three": "^0.143.0",
4037
"@use-gesture/react": "^10.0.0-beta.14",
4138
"axios": "^0.24.0",
4239
"buzzwords-shared": "1.0.0",
@@ -67,9 +64,9 @@
6764
},
6865
"devDependencies": {
6966
"@types/ramda": "^0.27.60",
70-
"@types/react": "^17.0.0",
71-
"@types/react-dom": "^17.0.0",
72-
"@types/three": "^0.129.1",
67+
"@types/react": "^18.0.17",
68+
"@types/react-dom": "^18.0.6",
69+
"@types/three": "^0.143.0",
7370
"@types/url-join": "^4.0.1",
7471
"@types/yup": "^0.29.13",
7572
"@types/zdog": "^1.1.1",
@@ -93,4 +90,4 @@
9390
"vite": "^2.3.8",
9491
"vite-plugin-electron": "^0.8.3"
9592
}
96-
}
93+
}

client/scripts/notarize.js

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,24 @@
11
// https://kilianvalkhof.com/2019/electron/notarizing-your-electron-application/
2-
require('dotenv').config();
3-
const { notarize } = require('electron-notarize');
2+
require("dotenv").config();
3+
const { notarize } = require("electron-notarize");
44

55
exports.default = async function notarizing(context) {
6-
const { electronPlatformName, appOutDir } = context;
7-
if (electronPlatformName !== 'darwin') {
6+
if (!(process.env.CSC_NAME || process.env.CSC_LINK)) {
7+
return;
8+
}
9+
const { electronPlatformName, appOutDir } = context;
10+
if (electronPlatformName !== "darwin") {
811
return;
912
}
1013

1114
const appName = context.packager.appInfo.productFilename;
1215

1316
return await notarize({
14-
tool: 'notarytool',
15-
appBundleId: 'com.gg.buzzwords.desktop',
17+
tool: "notarytool",
18+
appBundleId: "com.gg.buzzwords.desktop",
1619
appPath: `${appOutDir}/${appName}.app`,
1720
appleId: process.env.APPLEID,
1821
appleIdPassword: process.env.APPLEIDPASS,
19-
teamId: process.env.APPLETEAMID
22+
teamId: process.env.APPLETEAMID,
2023
});
2124
};

0 commit comments

Comments
 (0)