-
Notifications
You must be signed in to change notification settings - Fork 3
79 lines (64 loc) · 2.61 KB
/
unix-alpha-build.yml
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
name: Alpha Unix build
on: push
jobs:
build:
strategy:
matrix:
include:
- os: macos-latest
NAME: macos
- os: ubuntu-latest
NAME: linux
runs-on: ${{ matrix.os}}
env:
TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }}
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install cross-rs
run: cargo install cross
- name: Build service executable
if: matrix.NAME == 'linux'
run: cd platforms/unix/daemon && cargo build --release && cross build --release --target aarch64-unknown-linux-gnu
- name: Build service executable
if: matrix.NAME == 'macos'
run: cd platforms/unix/daemon && cargo build --release
- name: Rename service executable
run: cp target/release/coresd target/release/coresd-$(rustc -Vv | grep host | cut -f2 -d' ')
- name: Install node modules
run: npm ci
- name: Install webkit2gtk (ubuntu only)
if: matrix.NAME == 'linux'
run: |
sudo apt-get update
sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf
# Build service installer
- name: Build service installer
run: npm run build:core
- name: Get version
id: version
uses: notiz-dev/github-action-json-property@release
with:
path: package.json
prop_path: version
- name: Remove useless folders
run: |
rm -rf target/release/build
rm -rf target/release/deps
rm -rf target/release/bundle/appimage/cores.AppDir
npm run rename
shell: bash
# Upload the unpackaged app
- name: Upload service installer
uses: actions/upload-artifact@v4
with:
name: "cores-${{matrix.NAME}}-${{runner.arch}}"
path: "target/release"
# Upload the unpackaged app
- name: Upload service installer
if: matrix.NAME == 'linux'
uses: actions/upload-artifact@v4
with:
name: "coresd-${{matrix.NAME}}-arm64"
path: "target/aarch64-unknown-linux-gnu/release"