forked from xpf0000/FlyEnv
-
Notifications
You must be signed in to change notification settings - Fork 0
87 lines (77 loc) · 2.12 KB
/
linux-version-build.yml
File metadata and controls
87 lines (77 loc) · 2.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
name: Build FlyEnv Linux Packages
on:
push:
paths:
- 'build/linux.build.yml'
jobs:
build-packages:
name: Build Packages (${{ matrix.arch }})
runs-on: ${{ matrix.os }}
timeout-minutes: 60
strategy:
matrix:
include:
- arch: x64
os: ubuntu-22.04
target: x64
- arch: arm64
os: ubuntu-22.04-arm
target: arm64
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install Electron build dependencies
run: |
sudo apt-get update
sudo apt-get install -y \
g++ \
make \
python3 \
python3-pip \
pkg-config \
fakeroot \
rpm
- name: Setup Latest Node.js
uses: actions/setup-node@v4
with:
node-version: '24'
- name: Setup Go
uses: actions/setup-go@v6
with:
go-version-file: 'src/helper-go/go.mod'
cache-dependency-path: 'src/helper-go/go.sum'
- name: Cache node_modules and node-gyp
uses: actions/cache@v4
with:
path: |
node_modules
**/node_modules
.yarn/cache
~/.cache/node-gyp
key: ${{ runner.os }}-${{ matrix.arch }}-node-${{ hashFiles('**/package.json') }}
- name: Install Yarn and build tools
run: |
npm install -g yarn node-gyp
python3 -m pip install --upgrade pip
- name: Install dependencies with Yarn
run: |
yarn install
- name: Build Go helper
run: |
cd "$GITHUB_WORKSPACE/src/helper-go"
chmod +x ./build-os.sh
bash ./build-os.sh
- name: Build Electron packages with electron-builder
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
cd "$GITHUB_WORKSPACE"
yarn build
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: packages-${{ matrix.arch }}
path: |
release/*.deb
release/*.rpm
release/*.yml