Skip to content

Commit

Permalink
Add flatpak building (#172)
Browse files Browse the repository at this point in the history
  • Loading branch information
Hacksore authored Jul 22, 2024
1 parent e15c711 commit 14a6d2c
Show file tree
Hide file tree
Showing 4 changed files with 129 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/flatpak-build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Flatpak Build

on:
push:
branches:
- master
# TODO: remove
- flatpak
pull_request:
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
container:
image: bilelmoussaoui/flatpak-github-actions:gnome-42
options: --privileged
steps:
- uses: actions/checkout@v4
with:
submodules: true

- name: Build Flatpak bundle
uses: flatpak/flatpak-github-actions/flatpak-builder@v6
with:
bundle: overlayed.flatpak
manifest-path: distribution/dev.overlayed.Overlayed.yaml
cache-key: flatpak-builder-${{ github.ref }}
13 changes: 13 additions & 0 deletions distribution/dev.overlayed.Overlayed.desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@

[Desktop Entry]
Name=Overlayed
Comment=A Discord overlay for Linux
Exec=overlayed
Icon=dev.overlayed.Overlayed
Type=Application
Terminal=false
StartupNotify=true
Categories=Game;
Keywords=discord;
StartupWMClass=Overlayed
Version=1.4
38 changes: 38 additions & 0 deletions distribution/dev.overlayed.Overlayed.metainfo.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<?xml version="1.0" encoding="UTF-8"?>
<component type="desktop">
<id>com.overlayed.Overlayed</id>
<launchable type="desktop-id">com.overlayed.Overlayed.desktop</launchable>
<name>Overlayed</name>
<developer_name>Team Overlayed</developer_name>
<summary>A discord overlay</summary>
<metadata_license>CC0-1.0</metadata_license>
<project_license>GPL-3.0-only</project_license>
<url type="homepage">https://overlayed.dev</url>
<url type="bugtracker">https://github.com/overlayeddev/overlayed/issues</url>
<url type="vcs-browser">https://github.com/overlayeddev/overlayed</url>
<url type="contribute">https://github.com/overlayeddev/overlayed</url>
<description>
<p>See who's speaking in your Discord voice channel with a movable overlay, compatible with almost every game or app.</p>
<ul>
<li>User List - See who is speaking, muted, and deafened in the current voice channel</li>⋅
<li>Pinnable - Always stays on top so you can continue working or gaming</li>
<li>Transparent - Transparent window that can ignore mouse clicks</li>
<li>Join History - See who enters and leaves a channel</li>
</ul>
</description>
<screenshots>
<screenshot type="default">
<caption>The home screen of the app</caption>
<image>https://assets.overlayed.dev/appdir/pres/slide1.png</image>
</screenshot>
</screenshots>
<releases>
<release version="0.6.3" date="2023-12-14" type="stable">
<url>https://github.com/overlayeddev/overlayed/releases/tag/v0.5.0</url>
</release>
</releases>
<content_rating type="oars-1.1">
<content_attribute id="violence-fantasy">moderate</content_attribute>
<content_attribute id="social-chat">intense</content_attribute>
</content_rating>
</component>
50 changes: 50 additions & 0 deletions distribution/dev.overlayed.Overlayed.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
id: dev.overlayed.Overlayed

runtime: org.gnome.Platform
runtime-version: "45"
sdk: org.gnome.Sdk

rename-icon: overlayed
command: overlayed
finish-args:
# NOTE: not sure if this is for both IPC and Websockets transports
- --filesystem=xdg-run/app/com.discordapp.Discord:create # allows for discord rpc
- --device=all
- --share=ipc
- --share=network
- --socket=x11
- --socket=wayland

modules:
- name: overlayed
buildsystem: simple
build-commands:
- chmod +x Overlayed.AppImage
- ./Overlayed.AppImage --appimage-extract

- |
desktop-file-edit \
--set-name="Overlayed App" \
--set-comment="Overlayed's game launcher" \
--set-icon="$FLATPAK_ID" \
--set-key="StartupNotify" --set-value="true" \
--set-key="Categories" --set-value="Game;ActionGame;AdventureGame;Simulation;" \
--set-key="Keywords" --set-value="game;minecraft;mc;" \
--set-key="StartupWMClass" --set-value="Overlayed" \
squashfs-root/usr/share/applications/overlayed.desktop
- mkdir -p /app/{bin,share}
- cp -r squashfs-root/usr/share/icons /app/share/icons
- install -Dm755 squashfs-root/usr/bin/overlayed /app/bin/overlayed
- install -Dm644 squashfs-root/usr/share/applications/overlayed.desktop /app/share/applications/dev.overlayed.Overlayed.desktop
- install -Dm644 dev.overlayed.Overlayed.metainfo.xml /app/share/metainfo/dev.overlayed.OverlayedApp.metainfo.xml

sources:
- type: file
path: dev.overlayed.Overlayed.metainfo.xml

- type: file
url: https://github.com/overlayeddev/overlayed/releases/download/v0.5.0/overlayed_0.5.0_amd64.AppImage
dest-filename: Overlayed.AppImage
sha256: bbcc773e89ba6cdbf4b3e91156b2702b2a82a91b5df7a8bbd2e274d5104a9725
only-arches: [x86_64]

0 comments on commit 14a6d2c

Please sign in to comment.