Skip to content

Commit f37d524

Browse files
committed
ci: add release workflow
1 parent 7515054 commit f37d524

File tree

1 file changed

+112
-0
lines changed

1 file changed

+112
-0
lines changed

.github/workflows/release.yml

Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
name: Build & Release Meridia
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*"
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
build-windows:
13+
name: Build (Windows)
14+
runs-on: windows-latest
15+
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v4
19+
20+
- name: Setup Node.js
21+
uses: actions/setup-node@v4
22+
with:
23+
node-version: 20
24+
cache: npm
25+
26+
- name: Install dependencies
27+
run: npm ci
28+
29+
- name: Build Electron app (Windows)
30+
run: npm run build
31+
env:
32+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
33+
34+
- name: Upload Windows artifact
35+
uses: actions/upload-artifact@v4
36+
with:
37+
name: windows-build
38+
path: release/**/*-Setup.exe
39+
if-no-files-found: error
40+
41+
build-linux:
42+
name: Build (Linux)
43+
runs-on: ubuntu-latest
44+
45+
steps:
46+
- name: Checkout
47+
uses: actions/checkout@v4
48+
49+
- name: Setup Node.js
50+
uses: actions/setup-node@v4
51+
with:
52+
node-version: 20
53+
cache: npm
54+
55+
- name: Install Linux build dependencies
56+
run: |
57+
sudo apt-get update
58+
sudo apt-get install -y \
59+
libgtk-3-dev \
60+
libwebkit2gtk-4.0-dev \
61+
libayatana-appindicator3-dev \
62+
librsvg2-dev \
63+
patchelf \
64+
fuse \
65+
libfuse2
66+
67+
- name: Install dependencies
68+
run: npm ci
69+
70+
- name: Build Electron app (Linux)
71+
run: npm run build
72+
env:
73+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
74+
75+
- name: Upload Linux artifact
76+
uses: actions/upload-artifact@v4
77+
with:
78+
name: linux-build
79+
path: release/**/*.AppImage
80+
if-no-files-found: error
81+
82+
release:
83+
name: Publish Release
84+
needs: [build-windows, build-linux]
85+
runs-on: ubuntu-latest
86+
87+
steps:
88+
- name: Download Windows artifact
89+
uses: actions/download-artifact@v4
90+
with:
91+
name: windows-build
92+
path: artifacts/windows
93+
94+
- name: Download Linux artifact
95+
uses: actions/download-artifact@v4
96+
with:
97+
name: linux-build
98+
path: artifacts/linux
99+
100+
- name: Create GitHub Release
101+
uses: softprops/action-gh-release@v2
102+
with:
103+
name: "Meridia ${{ github.ref_name }}"
104+
tag_name: ${{ github.ref_name }}
105+
draft: false
106+
prerelease: ${{ contains(github.ref_name, 'alpha') || contains(github.ref_name, 'beta') || contains(github.ref_name, 'rc') }}
107+
generate_release_notes: true
108+
files: |
109+
artifacts/windows/**/*
110+
artifacts/linux/**/*
111+
env:
112+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)