Skip to content

Commit

Permalink
Fix building snap in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
h3poteto committed Dec 10, 2024
1 parent 11f6dc6 commit b7d91f9
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 5 deletions.
9 changes: 4 additions & 5 deletions .github/workflows/snap.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: Snap

on:
pull_request:
push:
tags:
- 'v*'
Expand Down Expand Up @@ -42,14 +43,12 @@ jobs:
channel: latest/stable
- name: Install snapcraft
run: |
sudo apt install snapd
sudo snap install core22
sudo snap install snapcraft --classic
- name: Install app dependencies and build
run: pnpm install --frozen-lockfile && pnpm tauri build

- name: Build snap
run: |
pnpm run snap
sudo snapcraft
- name: Publish
working-directory: src-tauri/target
run: |
snapcraft upload ./*.snap --release beta
60 changes: 60 additions & 0 deletions snapcraft.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: fedistar
base: core22
version: '1.10.0'
summary: Multi-column Fediverse client for desktop.
description: |
Multi-column Fediverse client for desktop. Supporting Mastodon, Pleroma, Friendica, Gotosocial, and Firefish
grade: stable
confinement: strict

layout:
/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/webkit2gtk-4.1:
bind: $SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/webkit2gtk-4.1

apps:
fedistar:
command: usr/bin/fedistar
desktop: usr/share/applications/fedistar.desktop
extensions: [gnome]
#plugs:
# - network
# Add whatever plugs you need here, see https://snapcraft.io/docs/snapcraft-interfaces for more info.
# The gnome extension already includes [ desktop, desktop-legacy, gsettings, opengl, wayland, x11, mount-observe, calendar-service ]

package-repositories:
- type: apt
components: [main]
suites: [noble]
key-id: 78E1918602959B9C59103100F1831DDAFC42E99D
url: http://ppa.launchpad.net/snappy-dev/snapcraft-daily/ubuntu

parts:
build-app:
plugin: dump
build-snaps:
- node/20/stable
- rustup/latest/stable
build-packages:
- libwebkit2gtk-4.1-dev
- build-essential
- curl
- wget
- file
- libxdo-dev
- libssl-dev
- libayatana-appindicator3-dev
- librsvg2-dev
- dpkg
stage-packages:
- libwebkit2gtk-4.1-0
- libayatana-appindicator3-1
source: .
override-build: |
set -eu
rustup default stable
npm install -g pnpm
pnpm install
pnpm run tauri build -- --bundles deb
dpkg -x src-tauri/target/release/bundle/deb/*.deb $SNAPCRAFT_PART_INSTALL/
sed -i -e "s|Icon=fedistar|Icon=/usr/share/icons/hicolor/32x32/apps/fedistar.png|g" $SNAPCRAFT_PART_INSTALL/usr/share/applications/fedistar.desktop

0 comments on commit b7d91f9

Please sign in to comment.