Skip to content

Commit 73674fa

Browse files
committed
github workflow for building on windows mac and linux
1 parent a678a1d commit 73674fa

1 file changed

Lines changed: 50 additions & 0 deletions

File tree

.github/workflows/release.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Build Cosmos Executables
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
build:
8+
runs-on: ${{ matrix.os }}
9+
strategy:
10+
matrix:
11+
os: [ubuntu-latest, windows-latest, macos-latest]
12+
13+
steps:
14+
- name: Check out Git repository
15+
uses: actions/checkout@v4
16+
17+
- name: Install Node.js
18+
uses: actions/setup-node@v4
19+
with:
20+
node-version: 20
21+
22+
- name: Install Dependencies
23+
run: npm install
24+
25+
- name: Build Web Assets (Vite)
26+
run: npm run build
27+
28+
- name: Build Electron App (Mac)
29+
if: matrix.os == 'macos-latest'
30+
run: npx electron-builder --mac
31+
env:
32+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
33+
34+
- name: Build Electron App (Windows)
35+
if: matrix.os == 'windows-latest'
36+
run: npx electron-builder --win
37+
env:
38+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
39+
40+
- name: Build Electron App (Linux)
41+
if: matrix.os == 'ubuntu-latest'
42+
run: npx electron-builder --linux
43+
env:
44+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
45+
46+
- name: Upload Artifacts
47+
uses: actions/upload-artifact@v4
48+
with:
49+
name: cosmos-release-${{ matrix.os }}
50+
path: release/

0 commit comments

Comments
 (0)