Skip to content

Commit 78250d0

Browse files
committed
test snapcraft build #clean
1 parent a0e10a4 commit 78250d0

File tree

3 files changed

+75
-72
lines changed

3 files changed

+75
-72
lines changed

.github/workflows/snap-build.yml

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
name: Linux Snap Build
2+
3+
on:
4+
push:
5+
branches:
6+
- dev
7+
8+
jobs:
9+
build-linux:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout code
14+
uses: actions/checkout@v4
15+
16+
- name: Install system dependencies
17+
run: |
18+
sudo apt-get update
19+
20+
sudo apt-get install -y \
21+
snapd \
22+
libgtk-3-dev \
23+
libwebkit2gtk-4.1-dev \
24+
libayatana-appindicator3-dev \
25+
librsvg2-dev \
26+
pkg-config \
27+
build-essential \
28+
curl \
29+
gstreamer1.0-plugins-base \
30+
gstreamer1.0-plugins-good \
31+
gstreamer1.0-plugins-bad \
32+
gstreamer1.0-plugins-ugly \
33+
gstreamer1.0-libav \
34+
gstreamer1.0-vaapi
35+
36+
sudo snap install snapcraft --classic
37+
38+
- name: Set up Bun
39+
uses: oven-sh/setup-bun@v2
40+
with:
41+
bun-version: latest
42+
43+
- name: Install Rust
44+
uses: dtolnay/rust-toolchain@stable
45+
46+
- name: Rust cache
47+
uses: swatinem/rust-cache@v2
48+
with:
49+
workspaces: 'src-tauri -> src-tauri/target'
50+
51+
- name: Export Tauri signing environment variables
52+
shell: bash
53+
run: |
54+
echo "TAURI_SIGNING_PRIVATE_KEY=${{ secrets.TAURI_SIGNING_PRIVATE_KEY }}" >> $GITHUB_ENV
55+
echo "TAURI_SIGNING_PRIVATE_KEY_PASSWORD=${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }}" >> $GITHUB_ENV
56+
57+
- name: Install dependencies
58+
run: bun install
59+
60+
- name: Build Linux Deb
61+
run: |
62+
rm -f src-tauri/target/release/bundle/deb/*.deb
63+
bun tauri build --bundles deb
64+
65+
66+
- name: Build Snap package
67+
run: |
68+
sudo snapcraft pack --destructive-mode
69+
70+
- name: Upload Snap artifact
71+
uses: actions/upload-artifact@v4
72+
with:
73+
name: hyperionbox-linux-snap
74+
path: ./*.snap
75+

.github/workflows/snapcraft-build.yml

Lines changed: 0 additions & 35 deletions
This file was deleted.

snap/snapcraft.yaml

Lines changed: 0 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,6 @@ description: |
88
grade: stable
99
confinement: strict
1010

11-
architectures:
12-
- build-on: amd64
13-
build-for: amd64
14-
- build-on: amd64
15-
build-for: arm64
16-
1711

1812
layout:
1913
/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/webkit2gtk-4.1:
@@ -66,43 +60,12 @@ parts:
6660
build-app:
6761
plugin: dump
6862

69-
build-environment:
70-
- TAURI_SIGNING_PRIVATE_KEY: TAURI_SIGNING_PRIVATE_KEY
71-
- TAURI_SIGNING_PRIVATE_KEY_PASSWORD: TAURI_SIGNING_PRIVATE_KEY_PASSWORD
72-
73-
74-
build-snaps:
75-
- rustup/latest/stable
76-
- bun-js/latest/stable
77-
build-packages:
78-
- libwebkit2gtk-4.1-dev
79-
- build-essential
80-
- curl
81-
- wget
82-
- file
83-
- libxdo-dev
84-
- libssl-dev
85-
- libayatana-appindicator3-dev
86-
- librsvg2-dev
87-
- dpkg
88-
- gstreamer1.0-plugins-base
89-
- gstreamer1.0-plugins-good
90-
- gstreamer1.0-plugins-bad
91-
- gstreamer1.0-plugins-ugly
92-
- gstreamer1.0-libav
93-
- gstreamer1.0-vaapi
9463
stage-packages:
9564
- libwebkit2gtk-4.1-0
9665
- libayatana-appindicator3-1
9766

9867
source: .
9968
override-build: |
100-
set -eu
101-
rustup default stable
102-
103-
bun install
104-
rm -f src-tauri/target/release/bundle/deb/*.deb
105-
bun tauri build --bundles deb
10669
dpkg -x src-tauri/target/release/bundle/deb/*.deb $SNAPCRAFT_PART_INSTALL/
10770
mkdir -p $SNAPCRAFT_PART_INSTALL/meta
10871
cp $SNAPCRAFT_PROJECT_DIR/snap_config/snapshots.yaml $SNAPCRAFT_PART_INSTALL/meta/

0 commit comments

Comments
 (0)