Skip to content
Closed
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
43 changes: 43 additions & 0 deletions .github/workflows/test-flatpak.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Test Flatpak Build

on:
workflow_dispatch:

permissions:
contents: read

env:
DO_NOT_TRACK: 1

jobs:
flatpak:
runs-on: ubuntu-latest
container:
image: ghcr.io/flathub-infra/flatpak-github-actions:gnome-48
options: --privileged

steps:
- name: Checkout code
uses: actions/checkout@v6

- name: Install flatpak-node-generator (from git master, includes pnpm support)
run: pip install --force-reinstall --no-cache-dir git+https://github.com/flatpak/flatpak-builder-tools.git#subdirectory=node

- name: Download cargo generator
run: |
pip install tomlkit
curl -fsSL https://raw.githubusercontent.com/flatpak/flatpak-builder-tools/master/cargo/flatpak-cargo-generator.py \
-o /tmp/flatpak-cargo-generator.py

- name: Generate pnpm-sources.json
run: flatpak-node-generator pnpm -o flatpak/pnpm-sources.json pnpm-lock.yaml

- name: Generate cargo-sources.json
run: python3 /tmp/flatpak-cargo-generator.py packages/player/src-tauri/Cargo.lock -o flatpak/cargo-sources.json

- name: Build Flatpak bundle
uses: flatpak/flatpak-github-actions/flatpak-builder@v6
with:
bundle: nuclear-music-player.flatpak
manifest-path: flatpak/com.nuclearplayer.Nuclear.yml
cache-key: flatpak-builder-${{ github.sha }}
2 changes: 1 addition & 1 deletion flatpak/com.nuclearplayer.Nuclear.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ modules:
npm_config_cache: /run/build/nuclear-music-player/npm-cache
build-commands:
- mkdir -p /run/build/nuclear-music-player/.npm-global
- npm install -g pnpm
- npm install -g pnpm@11.0.6

- pnpm install --offline --frozen-lockfile
- pnpm --filter @nuclearplayer/player build:frontend
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "0.0.10",
"private": true,
"type": "module",
"packageManager": "pnpm@10.33.2",
"packageManager": "pnpm@11.0.6",
"scripts": {
"dev": "turbo dev --filter=@nuclearplayer/player --filter=@nuclearplayer/ui",
"build": "turbo build",
Expand Down
Loading