From 499040073dfe51eee9d5c8daa771c9ba8266b7d9 Mon Sep 17 00:00:00 2001 From: Tom Payne Date: Mon, 30 Dec 2024 11:10:22 +0000 Subject: [PATCH] chore: Build flatpak package --- .github/workflows/main.yml | 7 +++++++ .gitignore | 3 +++ io.chezmoi.chezmoi.yml | 18 ++++++++++++++++++ 3 files changed, 28 insertions(+) create mode 100644 io.chezmoi.chezmoi.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 4710469eca38..7641a9805144 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -269,6 +269,13 @@ jobs: with: name: chezmoi-windows-amd64 path: dist/chezmoi-nocgo_windows_amd64_v1/chezmoi.exe + - name: create-flatpak + if: github.event_name == 'push' || needs.changes.outputs.code == 'true' + run: | + sudo apt-get --no-install-suggests --no-install-recommends --quiet --yes install flatpak flatpak-builder + flatpak remote-add --if-not-exists --user flathub https://dl.flathub.org/repo/flathub.flatpakrepo + flatpak-builder --force-clean --user --install-deps-from=flathub --repo=repo --install builddir io.chezmoi.chezmoi.yml + flatpak run io.chezmoi.chezmoi --version test-ubuntu: name: test-ubuntu-umask${{ matrix.umask }}-${{ matrix.test-index }} strategy: diff --git a/.gitignore b/.gitignore index c57c20c68d00..5772de770156 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +/.flatpak-builder /.vagrant /COMMIT /bin/actionlint @@ -9,9 +10,11 @@ /bin/golangci-lint /bin/goreleaser /bin/goversioninfo +/builddir /chezmoi /chezmoi.exe /coverage.out /dist +/repo /resource_windows_*.syso /versioninfo.json diff --git a/io.chezmoi.chezmoi.yml b/io.chezmoi.chezmoi.yml new file mode 100644 index 000000000000..e83400f3a5c8 --- /dev/null +++ b/io.chezmoi.chezmoi.yml @@ -0,0 +1,18 @@ +id: io.chezmoi.chezmoi +runtime: org.freedesktop.Platform +runtime-version: '23.08' +sdk: org.freedesktop.Sdk +command: chezmoi +modules: +- name: chezmoi + buildsystem: simple + build-commands: + - install -Dm755 chezmoi /app/bin/chezmoi + sources: + - type: file + path: dist/chezmoi-cgo-glibc_linux_amd64_v1/chezmoi +finish-args: +- --share=network +- --filesystem=host +- --filesystem=host-etc +- --filesystem=host-os