Skip to content

Commit 97224b2

Browse files
Merge pull request #1 from thomasjonstrup/thomasjonstrup-patch-1
Create build.yml
2 parents 5e89bf1 + c7cf31d commit 97224b2

File tree

2 files changed

+38
-1
lines changed

2 files changed

+38
-1
lines changed

.github/workflows/build.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Build/release
2+
3+
on: push
4+
5+
jobs:
6+
release:
7+
runs-on: ${{ matrix.os }}
8+
9+
strategy:
10+
matrix:
11+
os: [macos-latest, ubuntu-latest, windows-latest]
12+
13+
steps:
14+
- name: Check out Git repository
15+
uses: actions/checkout@v3
16+
- uses: pnpm/action-setup@v2
17+
with:
18+
version: 8
19+
- name: Install Node.js, NPM and Yarn
20+
uses: actions/setup-node@v3
21+
with:
22+
node-version: 18
23+
cache: "pnpm"
24+
- name: Install dependencies
25+
run: pnpm install
26+
- name: Build/release Electron app
27+
uses: cryogenicplanet/action-electron-builder@v2
28+
with:
29+
# GitHub token, automatically provided to the action
30+
# (No need to define this secret in the repo settings)
31+
github_token: ${{ secrets.github_token }}
32+
skip_install: true
33+
34+
# If the commit is tagged with a version (e.g. "v1.0.0"),
35+
# release the app after building
36+
release: ${{ startsWith(github.ref, 'refs/tags/v') }}

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
"version": "0.0.0",
55
"scripts": {
66
"dev": "vite",
7-
"build": "tsc && vite build",
7+
"build": "electron-vite build",
8+
"build:tsc": "tsc && vite build",
89
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
910
"preview": "vite preview",
1011
"electron-dev": "electron-vite dev -w",

0 commit comments

Comments
 (0)