Skip to content

Commit 1117472

Browse files
Add Flathub setup script, action, and workflow (#2027)
* Add Flathub setup script and workflow Co-Authored-By: yujonglee <yujonglee.dev@gmail.com> * Use setup-flathub.sh script in workflow Co-Authored-By: yujonglee <yujonglee.dev@gmail.com> * Convert setup-flathub to action and use in desktop_cd Co-Authored-By: yujonglee <yujonglee.dev@gmail.com> * Comment out setup_flathub action in desktop_cd for now Co-Authored-By: yujonglee <yujonglee.dev@gmail.com> --------- Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
1 parent 7747cb6 commit 1117472

File tree

4 files changed

+28
-0
lines changed

4 files changed

+28
-0
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
runs:
2+
using: "composite"
3+
steps:
4+
- if: ${{ runner.os == 'Linux' }}
5+
shell: bash
6+
run: bash ${{ github.workspace }}/scripts/setup-flathub.sh

.github/workflows/desktop_cd.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,7 @@ jobs:
200200
with:
201201
platform: linux
202202
- uses: ./.github/actions/pnpm_install
203+
# - uses: ./.github/actions/setup_flathub
203204
- run: pnpm -F ui build
204205
- run: ./scripts/resource.sh "./apps/desktop/${{ env.TAURI_CONF_PATH }}" "resources/libonnxruntime.so"
205206
- run: |
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
on:
2+
workflow_dispatch:
3+
4+
jobs:
5+
build:
6+
runs-on: ubuntu-latest
7+
steps:
8+
- uses: actions/checkout@v4
9+
- uses: ./.github/actions/setup_flathub
10+
11+
- name: Build Flatpak
12+
run: flatpak-builder --user --force-clean build-dir flatpak/com.hyprnote.app.yml

scripts/setup-flathub.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/usr/bin/env bash
2+
3+
. "$(dirname "$0")/bash-guard.sh"
4+
5+
set -euo pipefail
6+
7+
sudo apt-get update
8+
sudo apt-get install -y flatpak flatpak-builder
9+
flatpak remote-add --if-not-exists --user flathub https://dl.flathub.org/repo/flathub.flatpakrepo

0 commit comments

Comments
 (0)