-
Notifications
You must be signed in to change notification settings - Fork 46
Feat: Flatpak support #892
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
Open
bryce-hoehn
wants to merge
30
commits into
opencloud-eu:main
Choose a base branch
from
bryce-hoehn:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 29 commits
Commits
Show all changes
30 commits
Select commit
Hold shift + click to select a range
b8dd6d3
basic flatpak support
bryce-hoehn e804ede
only run on release publish, not every commit
bryce-hoehn 142bac2
example deploy stage
bryce-hoehn 9083192
switch to kde-6.9 to match flatpak manifest
bryce-hoehn 8e677db
bump opencloud version & fixed paths
bryce-hoehn 43d1ecd
Download libsecret dependency during buildtime
bryce-hoehn 1432407
fixed path
bryce-hoehn 65f4b0f
removed flat-manager step
bryce-hoehn 571bc83
moved manifest to root directory per flathub requirements: https://do…
bryce-hoehn 1b39750
auto-update flatpak manifest
bryce-hoehn bde0457
publish updated manifest to flathub repo
bryce-hoehn 07170f6
adds .desktop file
bryce-hoehn 83f39c9
use local .desktop file instead of url
bryce-hoehn aedc177
fixed line breaks
bryce-hoehn 152f32c
single line sed
bryce-hoehn 100e360
APPLICATION_REV_DOMAIN changed from eu.opencloud.desktop to eu.opencl…
bryce-hoehn 8e545b5
only trigger on releases
bryce-hoehn 9d38f88
fix release tag
bryce-hoehn f3c9e34
Delete .github/workflows/update-flathub.yml
bryce-hoehn cd4f518
ensure that update job completes before publishing to flathub
bryce-hoehn c2746e5
fix .desktop name
bryce-hoehn 394ba93
push instead of pr so publish step can run
bryce-hoehn 75b5fe9
test
bryce-hoehn 506c07c
chore: update flatpak to 3.0.5
github-actions[bot] ce73613
testing ci
bryce-hoehn 1ca6640
chore: update flatpak to 3.0.6
github-actions[bot] faea347
revert tests
bryce-hoehn 1635dd8
cleaner .desktop name
bryce-hoehn 8fe5c43
fix: flatpak version auto-derived from VERSION.cmake (updated automat…
bryce-hoehn 3f7bfeb
fix: fixed broken stock icon tag
bryce-hoehn File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| name: Flatpak Builder | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
|
|
||
| env: | ||
| FLATPAK_ID: eu.opencloud.OpenCloudDesktop | ||
|
|
||
| jobs: | ||
| # from https://github.com/flatpak/flatpak-github-actions | ||
| # this builds the flatpak for testing purposes | ||
| # flathub builds from source once submitted: https://docs.flathub.org/docs/for-app-authors/requirements | ||
| # alternatively, flatpak/flatpak-github-actions/flat-manager@v6 can be used for deploying to custom flatpak repo | ||
| flatpak: | ||
| name: "Flatpak" | ||
| container: | ||
| image: ghcr.io/flathub-infra/flatpak-github-actions:kde-6.9 | ||
| options: --privileged | ||
| strategy: | ||
| matrix: | ||
| variant: | ||
| - arch: x86_64 | ||
| runner: ubuntu-24.04 | ||
| - arch: aarch64 | ||
| runner: ubuntu-24.04-arm | ||
| runs-on: ${{ matrix.variant.runner }} | ||
| steps: | ||
| - uses: actions/checkout@v6 | ||
| - name: Download libsecret only | ||
| run: | | ||
| git clone --filter=blob:none --no-checkout --depth 1 https://github.com/flathub/shared-modules | ||
| cd shared-modules | ||
| git sparse-checkout set libsecret | ||
| git checkout | ||
| - uses: flatpak/flatpak-github-actions/flatpak-builder@v6 | ||
| with: | ||
| bundle: ${{ env.FLATPAK_ID }}.flatpak | ||
| manifest-path: ${{ env.FLATPAK_ID }}.yml | ||
| cache-key: flatpak-builder-${{ github.sha }} | ||
| arch: ${{ matrix.variant.arch }} | ||
| verbose: true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,49 @@ | ||
| name: Publish to Flathub | ||
|
|
||
| on: | ||
| release: | ||
| types: [published] | ||
| workflow_dispatch: | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| env: | ||
| FLATPAK_ID: eu.opencloud.OpenCloudDesktop | ||
|
|
||
| jobs: | ||
| publish: | ||
| name: "Update Flathub" | ||
| runs-on: ubuntu-24.04 | ||
| steps: | ||
| - uses: actions/checkout@v6 | ||
|
|
||
| - name: Get version from metainfo | ||
| id: version | ||
| run: | | ||
| VERSION=$(grep -oP '<release version="\K[^"]+' ${{ env.FLATPAK_ID }}.metainfo.xml) | ||
| echo "version=$VERSION" >> "$GITHUB_OUTPUT" | ||
|
|
||
| - name: Checkout Flathub repo | ||
| uses: actions/checkout@v6 | ||
| with: | ||
| repository: flathub/${{ env.FLATPAK_ID }} | ||
| token: ${{ secrets.FLATHUB_TOKEN }} | ||
| path: flathub | ||
|
|
||
| - name: Copy updated files | ||
| run: | | ||
| cp ${{ env.FLATPAK_ID }}.metainfo.xml flathub/ | ||
| cp ${{ env.FLATPAK_ID }}.yml flathub/ | ||
|
|
||
| - name: Create Pull Request to Flathub | ||
| uses: peter-evans/create-pull-request@v7 | ||
| with: | ||
| token: ${{ secrets.FLATHUB_TOKEN }} | ||
| path: flathub | ||
| title: "Update to ${{ steps.version.outputs.version }}" | ||
| body: | | ||
| Automated update to [v${{ steps.version.outputs.version }}](https://github.com/opencloud-eu/desktop/releases/tag/v${{ steps.version.outputs.version }}). | ||
| branch: update-${{ steps.version.outputs.version }} | ||
| commit-message: "Update to ${{ steps.version.outputs.version }}" | ||
| delete-branch: true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,73 @@ | ||
| name: Update Flatpak | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - main | ||
| paths: | ||
| - VERSION.cmake | ||
| workflow_dispatch: | ||
|
|
||
| permissions: | ||
| contents: write | ||
|
|
||
| env: | ||
| FLATPAK_ID: eu.opencloud.OpenCloudDesktop | ||
|
|
||
| jobs: | ||
| update: | ||
| name: "Update Flatpak files" | ||
| runs-on: ubuntu-24.04 | ||
| steps: | ||
| - uses: actions/checkout@v6 | ||
|
|
||
| - name: Read version from VERSION.cmake | ||
| id: release | ||
| run: | | ||
| MAJOR=$(grep 'MIRALL_VERSION_MAJOR' VERSION.cmake | grep -oP '\d+') | ||
| MINOR=$(grep 'MIRALL_VERSION_MINOR' VERSION.cmake | grep -oP '\d+') | ||
| PATCH=$(grep 'MIRALL_VERSION_PATCH' VERSION.cmake | grep -oP '\d+') | ||
|
|
||
| VERSION="${MAJOR}.${MINOR}.${PATCH}" | ||
| TAG="v${VERSION}" | ||
| DATE=$(date +%Y-%m-%d) | ||
| COMMIT="${{ github.sha }}" | ||
|
|
||
| echo "tag=$TAG" >> "$GITHUB_OUTPUT" | ||
| echo "version=$VERSION" >> "$GITHUB_OUTPUT" | ||
| echo "date=$DATE" >> "$GITHUB_OUTPUT" | ||
| echo "commit=$COMMIT" >> "$GITHUB_OUTPUT" | ||
|
|
||
| echo "## Release info" >> "$GITHUB_STEP_SUMMARY" | ||
| echo "Tag: \`$TAG\`" >> "$GITHUB_STEP_SUMMARY" | ||
| echo "Version: \`$VERSION\`" >> "$GITHUB_STEP_SUMMARY" | ||
| echo "Date: \`$DATE\`" >> "$GITHUB_STEP_SUMMARY" | ||
| echo "Commit: \`$COMMIT\`" >> "$GITHUB_STEP_SUMMARY" | ||
|
|
||
| - name: Update metainfo.xml | ||
| run: | | ||
| sed -i \ | ||
| -e 's|<release version="[^"]*" date="[^"]*">|<release version="${{ steps.release.outputs.version }}" date="${{ steps.release.outputs.date }}">|' \ | ||
| ${{ env.FLATPAK_ID }}.metainfo.xml | ||
|
|
||
| echo "Updated ${{ env.FLATPAK_ID }}.metainfo.xml:" | ||
| grep '<release version=' ${{ env.FLATPAK_ID }}.metainfo.xml | ||
|
|
||
| - name: Update Desktop.yml | ||
| run: | | ||
| # Update the tag and commit for the opencloud-desktop module source | ||
| sed -i \ | ||
| -e '/name: opencloud-desktop/,/^ - name:/{ s|tag: v.*|tag: ${{ steps.release.outputs.tag }}|; s|commit: [a-f0-9]\{40\}|commit: ${{ steps.release.outputs.commit }}|; }' \ | ||
| ${{ env.FLATPAK_ID }}.yml | ||
|
|
||
| echo "Updated ${{ env.FLATPAK_ID }}.yml:" | ||
| grep -A2 'name: opencloud-desktop' ${{ env.FLATPAK_ID }}.yml | head -1 | ||
| grep -E '^\s+tag:|^\s+commit:' ${{ env.FLATPAK_ID }}.yml | tail -2 | ||
|
|
||
| - name: Commit and push to main | ||
| run: | | ||
| git config user.name "github-actions[bot]" | ||
| git config user.email "github-actions[bot]@users.noreply.github.com" | ||
| git add ${{ env.FLATPAK_ID }}.metainfo.xml ${{ env.FLATPAK_ID }}.yml | ||
| git commit -m "chore: update flatpak to ${{ steps.release.outputs.version }}" | ||
| git push origin HEAD:main |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -13,6 +13,7 @@ admin/win/nsi/l10n/pofiles/*.po | |
| *.swp | ||
| *~$ | ||
| build* | ||
| !build-flatpak.yml | ||
| cscope.* | ||
| tags | ||
| t1.cfg | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| <?xml version="1.0" encoding="UTF-8"?> | ||
| <component type="desktop-application"> | ||
| <id>eu.opencloud.OpenCloudDesktop</id> | ||
| <name>Opencloud Desktop Client</name> | ||
| <project_license>GPL-2.0+</project_license> | ||
| <summary>Sync and collaborate on your desktop or laptop</summary> | ||
| <metadata_license>CC0-1.0</metadata_license> | ||
| <developer id="eu.opencloud"> | ||
| <name>Heinlein Group</name> | ||
| </developer> | ||
| <description> | ||
| <p>The OpenCloud desktop client keeps photos and documents always up to date, enabling you to work like you always did. | ||
| Any file you add, modify or delete in the synced folders on your desktop or laptop will show up, change or disappear on the server and all other connected devices.</p> | ||
| </description> | ||
| <icon type="stock">eu.opencloud.OpenCloudDesktop</icon> | ||
| <categories> | ||
| <category>Network</category> | ||
| <category>Utility</category> | ||
| </categories> | ||
| <launchable type="desktop-id">eu.opencloud.OpenCloudDesktop.desktop</launchable> | ||
| <screenshots> | ||
| <screenshot type="default"> | ||
| <caption>The options dialog</caption> | ||
| <image>https://opencloud.eu/sites/default/files/styles/416x233/public/2025-01/OpenCloud_Filesharing_Desktop_mobil_Hauptscreen.webp</image> | ||
| </screenshot> | ||
| </screenshots> | ||
| <branding> | ||
| <color type="primary" scheme_preference="light">#0082c9</color> | ||
| <color type="primary" scheme_preference="dark">#0082c9</color> | ||
| </branding> | ||
| <url type="homepage">https://opencloud.eu</url> | ||
| <url type="bugtracker">https://github.com/opencloud-eu/desktop/issues</url> | ||
| <url type="faq">https://docs.opencloud.eu/docs/user/intro/</url> | ||
| <url type="vcs-browser">https://github.com/opencloud-eu/desktop</url> | ||
| <releases> | ||
| <release version="3.0.3" date="2025-12-08"> | ||
| <description></description> | ||
| </release> | ||
| </releases> | ||
| <content_rating type="oars-1.1"/> | ||
| </component> | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,130 @@ | ||
| app-id: eu.opencloud.OpenCloudDesktop | ||
|
|
||
| runtime: org.kde.Platform | ||
| runtime-version: "6.9" | ||
| sdk: org.kde.Sdk | ||
|
|
||
| base: io.qt.qtwebengine.BaseApp | ||
| base-version: "6.9" | ||
|
|
||
| command: opencloud | ||
|
|
||
| finish-args: | ||
| - --device=dri | ||
| - --socket=wayland | ||
| - --socket=fallback-x11 | ||
| - --share=network | ||
| - --share=ipc | ||
| - --filesystem=home:rw | ||
| - --filesystem=xdg-run/opencloud:create | ||
| - --talk-name=org.freedesktop.Notifications | ||
| - --talk-name=org.freedesktop.secrets | ||
| - --talk-name=org.kde.StatusNotifierWatcher | ||
| - --own-name=eu.opencloud.OpenCloudDesktop | ||
| - --talk-name=org.kde.kwalletd5 | ||
| - --talk-name=org.kde.kwalletd6 | ||
| - --env=TMPDIR=/var/tmp | ||
|
|
||
| cleanup: | ||
| - /lib/*.a | ||
| - /lib/*.la | ||
| - /lib/x86_64-linux-gnu/pkgconfig | ||
| - /share/doc | ||
| - /share/icons/hicolor/1024x1024 | ||
| cleanup-commands: | ||
| - /app/cleanup-BaseApp.sh | ||
|
|
||
| modules: | ||
| - shared-modules/libsecret/libsecret.json | ||
|
|
||
| - name: qtkeychain | ||
| buildsystem: cmake-ninja | ||
| config-opts: | ||
| - -DCMAKE_INSTALL_LIBDIR=lib | ||
| - -DBUILD_TRANSLATIONS=NO | ||
| - -DBUILD_WITH_QT6=1 | ||
| cleanup: | ||
| - /include | ||
| - /mkspecs | ||
| - /lib/cmake | ||
| sources: | ||
| - type: archive | ||
| url: https://github.com/frankosterfeld/qtkeychain/archive/0.15.0.tar.gz | ||
| sha256: f4254dc8f0933b06d90672d683eab08ef770acd8336e44dfa030ce041dc2ca22 | ||
| x-checker-data: | ||
| type: anitya | ||
| url-template: https://github.com/frankosterfeld/qtkeychain/archive/$version.tar.gz | ||
| stable-only: true | ||
| project-id: 4138 | ||
|
|
||
| - name: rsvg-convert-shim | ||
| buildsystem: simple | ||
| build-commands: | ||
| - ln -s /usr/bin/rsvg-convert /app/bin/inkscape | ||
| cleanup: | ||
| - "*" | ||
|
|
||
| - name: libp11 | ||
| config-opts: | ||
| - --with-enginesdir=${FLATPAK_DEST}/lib/engines-3/ | ||
| - --with-modulesdir=${FLATPAK_DEST}/lib/ossl-modules/ | ||
| cleanup: | ||
| - /include | ||
| sources: | ||
| - type: archive | ||
| url: https://github.com/OpenSC/libp11/releases/download/libp11-0.4.16/libp11-0.4.16.tar.gz | ||
| sha256: 97777640492fa9e5831497e5892e291dfbf39a7b119d9cb6abb3ec8c56d17553 | ||
|
|
||
| - name: libre-graph-api | ||
| buildsystem: cmake | ||
| subdir: client | ||
| config-opts: | ||
| - -DCMAKE_INSTALL_LIBDIR=lib | ||
| - -DBUILD_SHARED_LIBS=ON | ||
| sources: | ||
| - type: git | ||
| url: https://github.com/opencloud-eu/libre-graph-api-cpp-qt-client.git | ||
| tag: v1.0.7 | ||
| commit: 72b89ddd9a5dab2a837d1ab078d6088fa0727695 | ||
|
|
||
| - name: kdsingleapplication | ||
| buildsystem: cmake | ||
| config-opts: | ||
| - -DCMAKE_INSTALL_LIBDIR=lib | ||
| - -DBUILD_TRANSLATIONS=NO | ||
| - -DBUILD_WITH_QT6=1 | ||
| sources: | ||
| - type: git | ||
| url: https://github.com/KDAB/KDSingleApplication.git | ||
| tag: v1.2.0 | ||
| commit: 3186a158f8e6565e89f5983b4028c892737844ff | ||
|
|
||
| - name: opencloud-desktop | ||
| buildsystem: cmake-ninja | ||
| config-opts: | ||
| - -DCMAKE_BUILD_TYPE=Release | ||
| - -DCMAKE_INSTALL_LIBDIR=lib | ||
| - -DNO_SHIBBOLETH=1 | ||
| - -DBUILD_SHELL_INTEGRATION_DOLPHIN=0 | ||
| - -DBUILD_SHELL_INTEGRATION_NAUTILUS=0 | ||
| - -DBUILD_UPDATER=OFF | ||
| - -DPLUGIN_INSTALL_DIR=/app/lib/plugins | ||
| - -DPLUGINDIR=/app/lib/plugins | ||
| - -DQT_MAJOR_VERSION=6 | ||
| cleanup: | ||
| - /include | ||
| post-install: | ||
| - install -Dm644 -t /app/share/metainfo eu.opencloud.OpenCloudDesktop.metainfo.xml | ||
| sources: | ||
| - type: git | ||
| url: https://github.com/opencloud-eu/desktop | ||
| tag: v3.0.3 | ||
| commit: 72fe8fb78e3e8b7dc9d2e54dfb497660e729cec3 | ||
| x-checker-data: | ||
| type: json | ||
| url: https://api.github.com/repos/opencloud-eu/desktop/releases/latest | ||
| tag-query: .tag_name | ||
| version-query: $tag | sub("^[vV]"; "") | ||
| timestamp-query: .published_at | ||
| - type: file | ||
| path: eu.opencloud.OpenCloudDesktop.metainfo.xml |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.