Skip to content

Commit e83163c

Browse files
committed
[WIP] build with github actions
1 parent 7812ab1 commit e83163c

File tree

2 files changed

+87
-0
lines changed

2 files changed

+87
-0
lines changed

.github/workflows/build.yml

+65
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
name: Build and Release
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
tags:
7+
- 'v*'
8+
pull_request:
9+
branches: [ master ]
10+
workflow_dispatch:
11+
12+
jobs:
13+
build:
14+
runs-on: ${{ matrix.os }}
15+
16+
strategy:
17+
matrix:
18+
os: [ubuntu-latest, windows-latest, macos-latest]
19+
20+
steps:
21+
- uses: actions/checkout@v4
22+
23+
- name: Setup Node.js
24+
uses: actions/setup-node@v4
25+
with:
26+
node-version: '18.x'
27+
cache: 'npm'
28+
29+
- name: Install dependencies
30+
run: npm ci
31+
32+
- name: Build React app
33+
run: CI=false npm run build
34+
35+
- name: Build Electron app
36+
run: |
37+
npm run electron:build
38+
env:
39+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
40+
41+
- name: Upload Linux artifacts
42+
if: matrix.os == 'ubuntu-latest'
43+
uses: actions/upload-artifact@v4
44+
with:
45+
name: linux-artifacts
46+
path: |
47+
dist/*.AppImage
48+
dist/*.deb
49+
dist/*.snap
50+
51+
- name: Upload Windows artifacts
52+
if: matrix.os == 'windows-latest'
53+
uses: actions/upload-artifact@v4
54+
with:
55+
name: windows-artifacts
56+
path: dist/*.exe
57+
58+
- name: Upload macOS artifacts
59+
if: matrix.os == 'macos-latest'
60+
uses: actions/upload-artifact@v4
61+
with:
62+
name: macos-artifacts
63+
path: |
64+
dist/*.dmg
65+
dist/*.pkg

package.json

+22
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,28 @@
7474
"last 1 safari version"
7575
]
7676
},
77+
"build": {
78+
"appId": "com.drivechain.launcher",
79+
"productName": "Drivechain Launcher",
80+
"files": [
81+
"build/**/*",
82+
"public/**/*"
83+
],
84+
"directories": {
85+
"buildResources": "public"
86+
},
87+
"linux": {
88+
"target": ["AppImage", "deb", "snap"],
89+
"category": "Development"
90+
},
91+
"win": {
92+
"target": "nsis"
93+
},
94+
"mac": {
95+
"target": ["dmg", "pkg"],
96+
"category": "public.app-category.developer-tools"
97+
}
98+
},
7799
"devDependencies": {
78100
"@babel/plugin-proposal-private-property-in-object": "^7.21.11",
79101
"@babel/plugin-transform-modules-commonjs": "^7.26.3",

0 commit comments

Comments
 (0)