-
Notifications
You must be signed in to change notification settings - Fork 4
127 lines (104 loc) · 3.33 KB
/
Copy pathlinux-packages.yml
File metadata and controls
127 lines (104 loc) · 3.33 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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
name: Linux Packages
on:
workflow_dispatch:
push:
tags:
- 'v*'
permissions:
contents: read
jobs:
prepare:
name: Read Version
runs-on: ubuntu-24.04
outputs:
version: ${{ steps.cargo_version.outputs.version }}
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Read Cargo version
id: cargo_version
run: |
version="$(awk -F '"' '/^version = "/ { print $2; exit }' Cargo.toml)"
if [[ -z "$version" ]]; then
echo "Failed to read version from Cargo.toml" >&2
exit 1
fi
echo "version=$version" >> "$GITHUB_OUTPUT"
deb:
name: Debian Package (${{ matrix.name }})
runs-on: ${{ matrix.runner }}
needs: prepare
strategy:
fail-fast: false
matrix:
include:
- name: x86_64
runner: ubuntu-24.04
artifact_arch: x86_64
- name: arm64
runner: ubuntu-24.04-arm
artifact_arch: arm64
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Setup Node
uses: actions/setup-node@v6
with:
node-version: 20
cache: npm
cache-dependency-path: ui/package-lock.json
- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
- name: Cache Rust artifacts
uses: Swatinem/rust-cache@v2
- name: Install build dependencies
run: |
sudo apt-get update
sudo apt-get install -y dpkg-dev libglib2.0-dev libgtk-3-dev libayatana-appindicator3-dev appstream desktop-file-utils
- name: Build Debian package
run: scripts/build-deb.sh
- name: Upload Debian artifact
uses: actions/upload-artifact@v7
with:
name: neomist-${{ needs.prepare.outputs.version }}-linux-${{ matrix.artifact_arch }}.deb
path: dist/neomist-${{ needs.prepare.outputs.version }}-linux-${{ matrix.artifact_arch }}.deb
if-no-files-found: error
appimage:
name: AppImage (${{ matrix.name }})
runs-on: ${{ matrix.runner }}
needs: prepare
strategy:
fail-fast: false
matrix:
include:
- name: x86_64
runner: ubuntu-24.04
artifact_arch: x86_64
- name: aarch64
runner: ubuntu-24.04-arm
artifact_arch: arm64
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Setup Node
uses: actions/setup-node@v6
with:
node-version: 20
cache: npm
cache-dependency-path: ui/package-lock.json
- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
- name: Cache Rust artifacts
uses: Swatinem/rust-cache@v2
- name: Install build dependencies
run: |
sudo apt-get update
sudo apt-get install -y libglib2.0-dev libgtk-3-dev libayatana-appindicator3-dev patchelf appstream desktop-file-utils
- name: Build AppImage
run: scripts/build-appimage.sh
- name: Upload AppImage artifact
uses: actions/upload-artifact@v7
with:
name: neomist-${{ needs.prepare.outputs.version }}-linux-${{ matrix.artifact_arch }}.AppImage
path: dist/neomist-${{ needs.prepare.outputs.version }}-linux-${{ matrix.artifact_arch }}.AppImage
if-no-files-found: error