Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

package: Add flatpak deployment #520

Merged
merged 2 commits into from
Oct 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 44 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,50 @@ jobs:
prerelease: true
file_glob: true

deploy-flatpak:
needs: test
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: recursive

- uses: oven-sh/setup-bun@v1
with:
bun-version: latest

- name: Install flatpak
run: |
sudo apt install -y flatpak flatpak-builder
sudo flatpak remote-add --system flathub https://flathub.org/repo/flathub.flatpakrepo
flatpak remote-add --user flathub https://flathub.org/repo/flathub.flatpakrepo || true
- name: Build electron
run: |
bun install --frozen-lockfile
bun run build
env DEBUG="@malept/flatpak-bundler" bun deploy:flatpak
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: cockpit-flatpak
path: dist/cockpit*.flatpak
if-no-files-found: error

- name: Upload Release
uses: svenstaro/upload-release-action@v2
if: startsWith(github.ref, 'refs/tags/') && success()
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: dist/cockpit*.flatpak
tag: ${{ github.ref }}
overwrite: true
prerelease: true
file_glob: true

deploy-blueos-extension:
needs: test
runs-on: ubuntu-latest
Expand Down
19 changes: 19 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"coverage": "vitest --coverage",
"deploy:electron:dir": "electron-builder --dir",
"deploy:electron": "electron-builder --publish=never",
"deploy:flatpak": "electron-builder --x64 --linux flatpak",
"dev": "vite",
"lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --ignore-path .gitignore --max-warnings=0",
"preview": "vite preview --port 5050",
Expand Down Expand Up @@ -101,6 +102,24 @@
"appId": "org.bluerobotics.cockpit",
"mac": {
"category": "public.app-category.entertainment"
},
"flatpak": {
"base": "org.electronjs.Electron2.BaseApp",
"baseVersion": "22.08",
"description": "An intuitive and customizable cross-platform ground control station for remote vehicles of all types.",
"finishArgs": [
"--socket=wayland",
"--socket=x11",
"--share=ipc",
"--device=dri",
"--socket=pulseaudio",
"--filesystem=/run/udev:ro",
"--share=network",
"--talk-name=org.freedesktop.Notifications"
],
"runtime": "org.freedesktop.Platform",
"runtimeVersion": "22.08",
"sdk": "org.freedesktop.Sdk"
}
}
}