Skip to content

Commit aa73518

Browse files
committed
github workflow to publish executable
1 parent 9a5886c commit aa73518

File tree

3 files changed

+2430
-55
lines changed

3 files changed

+2430
-55
lines changed

.github/workflows/release.yml

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
name: Build and Release
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
jobs:
9+
release:
10+
runs-on: ${{ matrix.os }}
11+
12+
strategy:
13+
matrix:
14+
os: [macos-latest, ubuntu-latest, windows-latest]
15+
16+
steps:
17+
- name: Check out Git repository
18+
uses: actions/checkout@v4
19+
20+
- name: Install Node.js
21+
uses: actions/setup-node@v4
22+
with:
23+
node-version: 20
24+
25+
- name: Install dependencies
26+
run: npm install
27+
28+
- name: Build application
29+
run: npm run dist
30+
env:
31+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
32+
33+
- name: Upload artifacts (macOS)
34+
if: matrix.os == 'macos-latest'
35+
uses: actions/upload-artifact@v4
36+
with:
37+
name: macos-build
38+
path: |
39+
dist/*.dmg
40+
dist/*.zip
41+
42+
- name: Upload artifacts (Linux)
43+
if: matrix.os == 'ubuntu-latest'
44+
uses: actions/upload-artifact@v4
45+
with:
46+
name: linux-build
47+
path: |
48+
dist/*.AppImage
49+
dist/*.deb
50+
51+
- name: Upload artifacts (Windows)
52+
if: matrix.os == 'windows-latest'
53+
uses: actions/upload-artifact@v4
54+
with:
55+
name: windows-build
56+
path: |
57+
dist/*.exe
58+
dist/*.zip
59+
60+
- name: Release
61+
uses: softprops/action-gh-release@v2
62+
if: startsWith(github.ref, 'refs/tags/')
63+
with:
64+
files: |
65+
dist/*.dmg
66+
dist/*.zip
67+
dist/*.AppImage
68+
dist/*.deb
69+
dist/*.exe
70+
env:
71+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)