super-productivity/electron-builder.yaml
johannesjo b6cad17c61 build(snap): set snap.publish=github to bypass snapStore fallback
electron-builder's snap target hard-codes a `{ provider: "snapStore" }`
fallback in `findSnapPublishConfig` when `snap.publish` is unset —
`linux.publish: [github]` does not override it because the snap helper
only matches snapStore entries in that list. With `--publish always` on
tag pushes, this triggered `SnapStorePublisher.upload` → `app-builder
publish-snap` → snapcraft, which is no longer installed on the runner
(we moved snap-store uploads to the Canonical container in build.yml).

Setting `snap.publish: github` routes the snap artifact through
`GitHubPublisher` instead. The .snap lands on the GitHub release as a
side effect; the dedicated edge/stable upload still happens via the
docker step.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-02 22:32:21 +02:00

195 lines
6.6 KiB
YAML

appId: superProductivity
productName: Super Productivity
artifactName: ${name}-${arch}.${ext}
files:
- electron/**/*
- '!electron/**/*.ts'
- '!electron/**/*.js.map'
- .tmp/angular-dist/**/*
- 'embedded.provisionprofile'
# Exclude Nx binaries - they're build tools, not runtime dependencies
- '!**/@nx/nx-darwin-*/**'
- '!**/@nx/nx-linux-*/**'
- '!**/@nx/nx-win32-*/**'
#afterSign: ./tools/notarizeMacApp.js
directories:
output: './.tmp/app-builds'
# Post-pack hook that installs a shell wrapper for Linux builds to force
# --ozone-platform=x11 in Snap+Wayland sessions.
# See tools/afterPack.js + build/linux/snap-wrapper.sh and
# docs/research/snap-wayland-gpu-fix-research.md §18.
afterPack: ./tools/afterPack.js
win:
target:
- target: nsis
arch:
- arm64
- x64
- target: portable
arch:
- arm64
- x64
publish:
- github
nsis:
# Hardcoded to avoid spaces (SignPath converts spaces to dots). Also referenced in build.yml.
artifactName: Super-Productivity-Setup-${arch}.${ext}
# allow to install to custom location
oneClick: false
allowToChangeInstallationDirectory: true
portable:
artifactName: ${name}-${arch}.${ext}
appx:
applicationId: SuperProductivity
displayName: Super Productivity
publisherDisplayName: johannesjo
publisher: CN=___-___
identityName: ___johannesjo.SuperProductivity
linux:
# Fix for issue #5259: Set executable name without spaces for snap compatibility
executableName: superproductivity
category: Office;ProjectManagement
mimeTypes:
- x-scheme-handler/superproductivity
desktop:
entry:
StartupWMClass: superproductivity
target:
- AppImage
- deb
- snap
- rpm
publish:
- github
rpm:
# Fix for issue #5368: Prevent /usr/lib/.build-id/ collisions with other Electron apps
fpm: ['--rpm-rpmbuild-define=_build_id_links none']
# leads to Error: Please specify executable name as linux.executableName instead of linux.desktop.Exec
# desktop:
# Name: Super Productivity
# Comment: A todo list and time tracking app
# Exec: superProductivity
# Terminal: false
# Type: Application
# Icon: build/icon.png
# GenericName: ToDo List and Time Tracker
snap:
# We upload the .snap to the Snap Store ourselves via Canonical's snapcraft
# container in CI (build.yml). electron-builder's snap target has a
# hard-coded fallback to `snapStore` in `findSnapPublishConfig` (snap.js):
# if `snap.publish` is unset, it falls through `linux.publish`/`config.publish`
# to `{ provider: "snapStore" }`, then invokes `snapcraft` on the runner
# during upload — and we no longer install snapcraft there (it was an
# unreliable `sudo snap install`). Setting `snap.publish: github` overrides
# that fallback. The .snap also lands on the GitHub release as a side effect,
# which is harmless (and a useful manual-download fallback).
publish: github
grade: stable
allowNativeWayland: true
autoStart: true
base: core22
confinement: strict
environment:
# Fix for issue #4920: Isolate fontconfig cache to prevent GTK dialog rendering issues
# https://github.com/super-productivity/super-productivity/issues/4920
FC_CACHEDIR: $SNAP_USER_DATA/.cache/fontconfig
# Fix for issue #7298: tray icon renders as three dots on Ubuntu 24.04+ snap.
# Chromium's StatusIconLinuxDbus writes the tray PNG to TMPDIR and sends
# its path to gnome-shell via the SNI IconThemePath property. The default
# /tmp inside a strict snap is bind-mounted to
# /tmp/snap-private-tmp/snap.<name>/tmp with mode 0700 on the parent, so
# gnome-shell (outside the mount namespace) cannot stat the file and
# falls back to 'image-loading-symbolic' (three dots). $XDG_RUNTIME_DIR
# (= /run/user/$UID) is visible to both sides, so redirecting Chromium's
# temp writes there restores icon rendering. Matches Signal Desktop's
# snap and the official Electron snapcraft guide. electron-builder's
# SnapOptions docstring claims this as a default but snap.js no longer
# injects it (see node_modules/app-builder-lib/out/targets/snap.js).
TMPDIR: $XDG_RUNTIME_DIR
plugs:
- default # Includes: home, desktop, desktop-legacy, x11, wayland, etc.
- password-manager-service
- system-observe
- login-session-observe
# Fix for issue #6031: Add filesystem access for local file sync
# https://github.com/super-productivity/super-productivity/issues/6031
- removable-media # Allows sync to external drives/USB storage
# Override electron-builder's hardcoded gnome-3-28-1804 content snap (core20 era)
# with gnome-42-2204 (core22 era) for up-to-date Mesa drivers and GSettings schemas.
# The plug name must match the template key to replace it rather than duplicate it.
# The explicit `content` attribute tells snapd to match the gnome-42-2204 slot.
# Pattern from Tidal HiFi: https://github.com/Mastermindzh/tidal-hifi
# gnome-42-2204 has global auto-connect (granted June 2022).
# Ref: electron-builder#9452, electron-builder#8548 (closed, not planned)
- gnome-3-28-1804:
interface: content
content: gnome-42-2204
target: $SNAP/gnome-platform
default-provider: gnome-42-2204
flatpak:
runtimeVersion: '25.08'
finishArgs:
- --share=network
- --share=ipc
- --socket=x11
- --socket=wayland
- --socket=fallback-x11
- --socket=pulseaudio
- --device=dri
- --filesystem=home
- --talk-name=org.freedesktop.Notifications
- --talk-name=org.kde.StatusNotifierWatcher
- --talk-name=org.gnome.Mutter.IdleMonitor
- --talk-name=org.freedesktop.secrets
- --system-talk-name=org.freedesktop.login1
- --env=XCURSOR_PATH=/run/host/user-share/icons:/run/host/share/icons
- --env=ELECTRON_TRASH=gio
mac:
appId: com.super-productivity.app
type: distribution
category: public.app-category.productivity
entitlements: build/entitlements.mac.plist
entitlementsInherit: build/entitlements.mac.plist
hardenedRuntime: true
gatekeeperAssess: false
provisioningProfile: embedded.provisionprofile
darkModeSupport: true
notarize: true
extendInfo:
ITSAppUsesNonExemptEncryption: false
publish:
- github
target:
# - zip
- target: dmg
arch:
- arm64
- x64
- universal
dmg:
sign: true
publish:
- github
pkg:
publish: never
# HERE: electron-builder.mas.yaml
#mas:
# type: distribution
# category: public.app-category.productivity
# entitlements: build/entitlements.mas.plist
# entitlementsInherit: build/entitlements.mas.inherit.plist
# provisioningProfile: prod.provisionprofile
# icon: build/icon.icns
# hardenedRuntime: true
# publish: never