mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-14 10:26:19 +01:00
[PM-14850] Flatpak development & qa artifacts (#11925)
* Add flatpak development manifest * Undo removal of libsecret * Update .github/workflows/build-desktop.yml Co-authored-by: Vince Grassia <593223+vgrassia@users.noreply.github.com> --------- Co-authored-by: Vince Grassia <593223+vgrassia@users.noreply.github.com>
This commit is contained in:
parent
0b11596f08
commit
a75c2118ec
15
.github/workflows/build-desktop.yml
vendored
15
.github/workflows/build-desktop.yml
vendored
@ -166,7 +166,7 @@ jobs:
|
|||||||
- name: Set up environment
|
- name: Set up environment
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
sudo apt-get -y install pkg-config libxss-dev libsecret-1-dev rpm musl-dev musl-tools
|
sudo apt-get -y install pkg-config libxss-dev libsecret-1-dev rpm musl-dev musl-tools flatpak flatpak-builder
|
||||||
|
|
||||||
- name: Set up Snap
|
- name: Set up Snap
|
||||||
run: sudo snap install snapcraft --classic
|
run: sudo snap install snapcraft --classic
|
||||||
@ -248,6 +248,19 @@ jobs:
|
|||||||
name: ${{ needs.setup.outputs.release_channel }}-linux.yml
|
name: ${{ needs.setup.outputs.release_channel }}-linux.yml
|
||||||
path: apps/desktop/dist/${{ needs.setup.outputs.release_channel }}-linux.yml
|
path: apps/desktop/dist/${{ needs.setup.outputs.release_channel }}-linux.yml
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
|
|
||||||
|
- name: Build flatpak
|
||||||
|
working-directory: apps/desktop
|
||||||
|
run: |
|
||||||
|
sudo flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
|
||||||
|
sudo npm run pack:lin:flatpak
|
||||||
|
|
||||||
|
- name: Upload flatpak artifact
|
||||||
|
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
|
||||||
|
with:
|
||||||
|
name: com.bitwarden.desktop.flatpak
|
||||||
|
path: apps/desktop/dist/com.bitwarden.desktop.flatpak
|
||||||
|
if-no-files-found: error
|
||||||
|
|
||||||
|
|
||||||
windows:
|
windows:
|
||||||
|
3
.gitignore
vendored
3
.gitignore
vendored
@ -27,6 +27,9 @@ npm-debug.log
|
|||||||
dist
|
dist
|
||||||
build
|
build
|
||||||
.angular/cache
|
.angular/cache
|
||||||
|
.flatpak
|
||||||
|
.flatpak-repo
|
||||||
|
.flatpak-builder
|
||||||
|
|
||||||
# Testing
|
# Testing
|
||||||
coverage
|
coverage
|
||||||
|
@ -34,6 +34,7 @@
|
|||||||
"electron:ignore": "node ./scripts/start.js --ignore-certificate-errors",
|
"electron:ignore": "node ./scripts/start.js --ignore-certificate-errors",
|
||||||
"clean:dist": "rimraf ./dist",
|
"clean:dist": "rimraf ./dist",
|
||||||
"pack:dir": "npm run clean:dist && electron-builder --dir -p never",
|
"pack:dir": "npm run clean:dist && electron-builder --dir -p never",
|
||||||
|
"pack:lin:flatpak": "npm run clean:dist && electron-builder --dir -p never && flatpak-builder --repo=build/.repo build/.flatpak ./resources/com.bitwarden.desktop.devel.yaml --install-deps-from=flathub --force-clean && flatpak build-bundle ./build/.repo/ ./dist/com.bitwarden.desktop.flatpak com.bitwarden.desktop",
|
||||||
"pack:lin": "npm run clean:dist && electron-builder --linux --x64 -p never",
|
"pack:lin": "npm run clean:dist && electron-builder --linux --x64 -p never",
|
||||||
"pack:mac": "npm run clean:dist && electron-builder --mac --universal -p never",
|
"pack:mac": "npm run clean:dist && electron-builder --mac --universal -p never",
|
||||||
"pack:mac:arm64": "npm run clean:dist && electron-builder --mac --arm64 -p never",
|
"pack:mac:arm64": "npm run clean:dist && electron-builder --mac --arm64 -p never",
|
||||||
|
43
apps/desktop/resources/com.bitwarden.desktop.devel.yaml
Normal file
43
apps/desktop/resources/com.bitwarden.desktop.devel.yaml
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
app-id: com.bitwarden.desktop
|
||||||
|
runtime: org.freedesktop.Platform
|
||||||
|
runtime-version: "24.08"
|
||||||
|
sdk: org.freedesktop.Sdk
|
||||||
|
base: org.electronjs.Electron2.BaseApp
|
||||||
|
base-version: "24.08"
|
||||||
|
command: bitwarden.sh
|
||||||
|
finish-args:
|
||||||
|
- --share=ipc
|
||||||
|
- --share=network
|
||||||
|
- --socket=wayland
|
||||||
|
- --socket=x11
|
||||||
|
- --device=dri
|
||||||
|
- --env=XDG_CURRENT_DESKTOP=Unity
|
||||||
|
- --env=XCURSOR_PATH=/run/host/user-share/icons:/run/host/share/icons
|
||||||
|
- --talk-name=org.kde.StatusNotifierWatcher
|
||||||
|
- --talk-name=org.freedesktop.Notifications
|
||||||
|
- --talk-name=org.freedesktop.secrets
|
||||||
|
- --talk-name=com.canonical.AppMenu.Registrar
|
||||||
|
- --system-talk-name=org.freedesktop.PolicyKit1
|
||||||
|
# Lock on lockscreen
|
||||||
|
- --talk-name=org.gnome.ScreenSaver
|
||||||
|
- --talk-name=org.freedesktop.ScreenSaver
|
||||||
|
- --system-talk-name=org.freedesktop.login1
|
||||||
|
- --filesystem=xdg-download
|
||||||
|
modules:
|
||||||
|
- name: bitwarden-desktop
|
||||||
|
buildsystem: simple
|
||||||
|
build-commands:
|
||||||
|
- mkdir -p /app/bin
|
||||||
|
- mkdir -p /app/bin/Bitwarden/
|
||||||
|
- cp -r ./* /app/bin/
|
||||||
|
- install bitwarden.sh /app/bin/bitwarden.sh
|
||||||
|
sources:
|
||||||
|
- type: dir
|
||||||
|
path: ../dist/linux-unpacked
|
||||||
|
- type: script
|
||||||
|
dest-filename: bitwarden.sh
|
||||||
|
commands:
|
||||||
|
- ulimit -c 0
|
||||||
|
- export TMPDIR="$XDG_RUNTIME_DIR/app/$FLATPAK_ID"
|
||||||
|
- exec zypak-wrapper /app/bin/bitwarden-app --ozone-platform-hint=auto
|
||||||
|
--enable-features=WaylandWindowDecorations "$@"
|
Loading…
Reference in New Issue
Block a user