Skip to content

Commit 82eb7dc

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

File tree

2 files changed

+97
-2
lines changed

2 files changed

+97
-2
lines changed

.github/workflows/build.yml

+67
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
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+
env:
34+
CI: false
35+
run: npm run build
36+
37+
- name: Build Electron app
38+
run: |
39+
npm run electron-build
40+
env:
41+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
42+
43+
- name: Upload Linux artifacts
44+
if: matrix.os == 'ubuntu-latest'
45+
uses: actions/upload-artifact@v4
46+
with:
47+
name: linux-artifacts
48+
path: |
49+
dist/*.AppImage
50+
dist/*.deb
51+
dist/*.snap
52+
53+
- name: Upload Windows artifacts
54+
if: matrix.os == 'windows-latest'
55+
uses: actions/upload-artifact@v4
56+
with:
57+
name: windows-artifacts
58+
path: dist/*.exe
59+
60+
- name: Upload macOS artifacts
61+
if: matrix.os == 'macos-latest'
62+
uses: actions/upload-artifact@v4
63+
with:
64+
name: macos-artifacts
65+
path: |
66+
dist/*.dmg
67+
dist/*.pkg

package.json

+30-2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22
"name": "drivechain-launcher",
33
"version": "0.1.0",
44
"private": true,
5+
"description": "Drivechain Launcher Application",
6+
"author": {
7+
"name": "Drivechain",
8+
"email": "support@drivechain.info"
9+
},
510
"main": "public/electron.js",
611
"homepage": "./",
712
"dependencies": {
@@ -20,8 +25,6 @@
2025
"bitcoinjs-lib": "^6.1.7",
2126
"concurrently": "^8.2.2",
2227
"cross-env": "^7.0.3",
23-
"electron": "^28.1.0",
24-
"electron-builder": "^24.9.1",
2528
"electron-dl": "^4.0.0",
2629
"electron-is-dev": "^2.0.0",
2730
"electron-store": "^10.0.0",
@@ -74,7 +77,32 @@
7477
"last 1 safari version"
7578
]
7679
},
80+
"build": {
81+
"appId": "com.drivechain.launcher",
82+
"productName": "Drivechain Launcher",
83+
"files": [
84+
"build/**/*",
85+
"public/**/*"
86+
],
87+
"directories": {
88+
"buildResources": "public"
89+
},
90+
"linux": {
91+
"target": ["AppImage", "deb", "snap"],
92+
"category": "Development",
93+
"maintainer": "Drivechain <support@drivechain.info>"
94+
},
95+
"win": {
96+
"target": "nsis"
97+
},
98+
"mac": {
99+
"target": ["dmg", "pkg"],
100+
"category": "public.app-category.developer-tools"
101+
}
102+
},
77103
"devDependencies": {
104+
"electron": "^28.1.0",
105+
"electron-builder": "^24.9.1",
78106
"@babel/plugin-proposal-private-property-in-object": "^7.21.11",
79107
"@babel/plugin-transform-modules-commonjs": "^7.26.3",
80108
"@babel/preset-env": "^7.26.0",

0 commit comments

Comments
 (0)