Skip to content

Commit a78da9a

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

File tree

2 files changed

+91
-2
lines changed

2 files changed

+91
-2
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

+26-2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
"name": "drivechain-launcher",
33
"version": "0.1.0",
44
"private": true,
5+
"description": "Drivechain Launcher Application",
6+
"author": "Drivechain",
57
"main": "public/electron.js",
68
"homepage": "./",
79
"dependencies": {
@@ -20,8 +22,6 @@
2022
"bitcoinjs-lib": "^6.1.7",
2123
"concurrently": "^8.2.2",
2224
"cross-env": "^7.0.3",
23-
"electron": "^28.1.0",
24-
"electron-builder": "^24.9.1",
2525
"electron-dl": "^4.0.0",
2626
"electron-is-dev": "^2.0.0",
2727
"electron-store": "^10.0.0",
@@ -74,7 +74,31 @@
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": {
100+
"electron": "^28.1.0",
101+
"electron-builder": "^24.9.1",
78102
"@babel/plugin-proposal-private-property-in-object": "^7.21.11",
79103
"@babel/plugin-transform-modules-commonjs": "^7.26.3",
80104
"@babel/preset-env": "^7.26.0",

0 commit comments

Comments
 (0)