Skip to content

Commit

Permalink
chore: Build flatpak package
Browse files Browse the repository at this point in the history
  • Loading branch information
twpayne committed Dec 30, 2024
1 parent 9212b40 commit 00460a1
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,15 @@ 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 --version
flatpak-builder --version
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:
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/.flatpak-builder
/.vagrant
/COMMIT
/bin/actionlint
Expand All @@ -9,9 +10,11 @@
/bin/golangci-lint
/bin/goreleaser
/bin/goversioninfo
/builddir
/chezmoi
/chezmoi.exe
/coverage.out
/dist
/repo
/resource_windows_*.syso
/versioninfo.json
18 changes: 18 additions & 0 deletions io.chezmoi.chezmoi.yml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 00460a1

Please sign in to comment.