Compare commits
14 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 6ca1143c22 | |||
| e431f205c2 | |||
| eac8195f68 | |||
| ea7c57962b | |||
| 96fa8cc647 | |||
| 6817b554e5 | |||
| cb373b6dc6 | |||
| 532af4a680 | |||
| 3eb9b8e84b | |||
| 6907a33dc7 | |||
| 1aa5f7e1c3 | |||
| e11c0490fc | |||
| 61ffe199ee | |||
| 5eecab5943 |
@@ -1,11 +1,41 @@
|
|||||||
|
name: Release Please
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
tags:
|
branches: [main] # updates/opens the release PR when commits land on main
|
||||||
- v*
|
workflow_dispatch:
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
pull-requests: write
|
||||||
|
id-token: write
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: release-please
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
release:
|
release-please:
|
||||||
|
name: Release Please
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
outputs:
|
||||||
|
release_created: ${{ steps.rp.outputs.release_created }}
|
||||||
|
steps:
|
||||||
|
- id: app-token
|
||||||
|
uses: actions/create-github-app-token@v2
|
||||||
|
with:
|
||||||
|
app-id: ${{ secrets.GH_STOAT_RELEASE_APP_ID }}
|
||||||
|
private-key: ${{ secrets.GH_STOAT_RELEASE_APP_PRIVATE_KEY }}
|
||||||
|
- id: rp
|
||||||
|
uses: googleapis/release-please-action@v4
|
||||||
|
with:
|
||||||
|
token: ${{ steps.app-token.outputs.token }}
|
||||||
|
config-file: release-please-config.json
|
||||||
|
|
||||||
|
publish-release:
|
||||||
name: Publish App
|
name: Publish App
|
||||||
|
needs: release-please
|
||||||
|
if: needs.release-please.outputs.release_created == 'true'
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
name: "Lint PR"
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request_target:
|
||||||
|
types:
|
||||||
|
- opened
|
||||||
|
- reopened
|
||||||
|
- edited
|
||||||
|
- synchronize
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
main:
|
||||||
|
name: Validate PR title
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
pull-requests: read
|
||||||
|
steps:
|
||||||
|
- uses: amannn/action-semantic-pull-request@v6
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
".": "1.1.12"
|
||||||
|
}
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
# Changelog
|
||||||
|
|
||||||
|
## [1.1.12](https://github.com/stoatchat/for-desktop/compare/v1.1.11...v1.1.12) (2025-12-29)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* add NixOS compatibility for electron startup ([#23](https://github.com/stoatchat/for-desktop/issues/23)) ([3eb9b8e](https://github.com/stoatchat/for-desktop/commit/3eb9b8e84bf05debf9843b80c468911fd095f4a0))
|
||||||
|
* correctly load badge count; expose to renderer ([#25](https://github.com/stoatchat/for-desktop/issues/25)) ([6817b55](https://github.com/stoatchat/for-desktop/commit/6817b554e57c5a65b7b4aca7d1cc4e05cd6f01b7))
|
||||||
|
* event listener accumulation from rpc client ([#26](https://github.com/stoatchat/for-desktop/issues/26)) ([96fa8cc](https://github.com/stoatchat/for-desktop/commit/96fa8cc647029cb53e5d619b94debc6cdfdf32f6))
|
||||||
|
* **macos:** tray icon size ([5eecab5](https://github.com/stoatchat/for-desktop/commit/5eecab59431cb4966eaa1fc907a8e5c16c813230))
|
||||||
|
* rpc should define largeImageText ([#21](https://github.com/stoatchat/for-desktop/issues/21)) ([cb373b6](https://github.com/stoatchat/for-desktop/commit/cb373b6dc62630147151039c3711aef74c8c2d88))
|
||||||
|
* use the correct argument for auto start ([#22](https://github.com/stoatchat/for-desktop/issues/22)) ([532af4a](https://github.com/stoatchat/for-desktop/commit/532af4a680069f72734148b0ccdacec6c435e640)), closes [#20](https://github.com/stoatchat/for-desktop/issues/20)
|
||||||
@@ -74,11 +74,3 @@ git -c submodule."assets".update=checkout submodule update --init assets
|
|||||||
```
|
```
|
||||||
|
|
||||||
Currently, this is required to build, any forks are expected to provide their own assets.
|
Currently, this is required to build, any forks are expected to provide their own assets.
|
||||||
|
|
||||||
## Publishing Guide
|
|
||||||
|
|
||||||
To publish a new version, simply tag a new release by:
|
|
||||||
|
|
||||||
1. Edit `package.json` with the new version
|
|
||||||
2. Create a new tag from latest commit by `git tag v1.0.0`
|
|
||||||
3. Push the tag and commit by `git push --atomic origin main v1.0.0`
|
|
||||||
|
|||||||
+1
-1
Submodule assets updated: 628eb2f825...4c6419a274
+3
-2
@@ -1,11 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "stoat-desktop",
|
"name": "stoat-desktop",
|
||||||
"productName": "stoat-desktop",
|
"productName": "stoat-desktop",
|
||||||
"version": "1.1.11",
|
"version": "1.1.12",
|
||||||
"main": ".vite/build/main.js",
|
"main": ".vite/build/main.js",
|
||||||
"repository": "stoatchat/desktop",
|
"repository": "stoatchat/desktop",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "electron-forge start",
|
"start": "./start.sh",
|
||||||
|
"start:forge": "electron-forge start",
|
||||||
"package": "electron-forge package",
|
"package": "electron-forge package",
|
||||||
"make": "electron-forge make",
|
"make": "electron-forge make",
|
||||||
"publish": "electron-forge publish",
|
"publish": "electron-forge publish",
|
||||||
|
|||||||
@@ -0,0 +1,14 @@
|
|||||||
|
{
|
||||||
|
"packages": {
|
||||||
|
".": {
|
||||||
|
"changelog-path": "CHANGELOG.md",
|
||||||
|
"release-type": "node",
|
||||||
|
"bump-minor-pre-major": false,
|
||||||
|
"bump-patch-for-minor-pre-major": false,
|
||||||
|
"draft": false,
|
||||||
|
"prerelease": false,
|
||||||
|
"include-component-in-tag": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json"
|
||||||
|
}
|
||||||
@@ -5,7 +5,7 @@ import { ipcMain } from "electron";
|
|||||||
import { mainWindow } from "./window";
|
import { mainWindow } from "./window";
|
||||||
|
|
||||||
export const autoLaunch = new AutoLaunch({
|
export const autoLaunch = new AutoLaunch({
|
||||||
name: "Revolt",
|
name: "Stoat",
|
||||||
});
|
});
|
||||||
|
|
||||||
ipcMain.on("isAutostart?", () =>
|
ipcMain.on("isAutostart?", () =>
|
||||||
@@ -14,6 +14,10 @@ ipcMain.on("isAutostart?", () =>
|
|||||||
.then((enabled) => mainWindow.webContents.send("isAutostart", enabled)),
|
.then((enabled) => mainWindow.webContents.send("isAutostart", enabled)),
|
||||||
);
|
);
|
||||||
|
|
||||||
ipcMain.on("setAutostart", (state) =>
|
ipcMain.on("setAutostart", (_event, state: boolean) => {
|
||||||
state ? autoLaunch.enable() : autoLaunch.disable(),
|
if (state) {
|
||||||
);
|
autoLaunch.enable();
|
||||||
|
} else {
|
||||||
|
autoLaunch.disable();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import dbus from "@homebridge/dbus-native";
|
import dbus from "@homebridge/dbus-native";
|
||||||
|
|
||||||
import { NativeImage, app, nativeImage } from "electron";
|
import { NativeImage, app, ipcMain, nativeImage } from "electron";
|
||||||
|
|
||||||
import { mainWindow } from "./window";
|
import { mainWindow } from "./window";
|
||||||
|
|
||||||
@@ -21,7 +21,7 @@ export async function setBadgeCount(count: number) {
|
|||||||
nativeIcons[count] = nativeImage.createFromDataURL(
|
nativeIcons[count] = nativeImage.createFromDataURL(
|
||||||
await import(
|
await import(
|
||||||
`../../assets/desktop/badges/${Math.min(count, 10)}.ico?asset`
|
`../../assets/desktop/badges/${Math.min(count, 10)}.ico?asset`
|
||||||
),
|
).then((asset) => asset.default),
|
||||||
);
|
);
|
||||||
|
|
||||||
mainWindow.setOverlayIcon(
|
mainWindow.setOverlayIcon(
|
||||||
@@ -65,3 +65,5 @@ export async function setBadgeCount(count: number) {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ipcMain.on("setBadgeCount", (_event, count: number) => setBadgeCount(count));
|
||||||
|
|||||||
@@ -8,6 +8,9 @@ let rpc: Client;
|
|||||||
export async function initDiscordRpc() {
|
export async function initDiscordRpc() {
|
||||||
if (!config.discordRpc) return;
|
if (!config.discordRpc) return;
|
||||||
|
|
||||||
|
// clean up existing client if one exists
|
||||||
|
rpc?.removeAllListeners();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
rpc = new Client({ transport: "ipc" });
|
rpc = new Client({ transport: "ipc" });
|
||||||
|
|
||||||
@@ -16,8 +19,7 @@ export async function initDiscordRpc() {
|
|||||||
state: "stoat.chat",
|
state: "stoat.chat",
|
||||||
details: "Chatting with others",
|
details: "Chatting with others",
|
||||||
largeImageKey: "qr",
|
largeImageKey: "qr",
|
||||||
// largeImageText: "Communication is critical – use Revolt.",
|
largeImageText: "Join Stoat!",
|
||||||
largeImageText: "",
|
|
||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
label: "Join Stoat",
|
label: "Join Stoat",
|
||||||
|
|||||||
+11
-2
@@ -8,12 +8,21 @@ import { mainWindow, quitApp } from "./window";
|
|||||||
// internal tray state
|
// internal tray state
|
||||||
let tray: Tray = null;
|
let tray: Tray = null;
|
||||||
|
|
||||||
// load the tray icon
|
// Create and resize tray icon for macOS
|
||||||
const trayIcon = nativeImage.createFromDataURL(trayIconAsset);
|
function createTrayIcon() {
|
||||||
|
const image = nativeImage.createFromDataURL(trayIconAsset);
|
||||||
|
const resized = image.resize({ width: 20, height: 20 });
|
||||||
|
|
||||||
|
// Mark as template image so it adapts to dark/light mode
|
||||||
|
resized.setTemplateImage(true);
|
||||||
|
|
||||||
|
return resized;
|
||||||
|
}
|
||||||
|
|
||||||
// trayIcon.setTemplateImage(true);
|
// trayIcon.setTemplateImage(true);
|
||||||
|
|
||||||
export function initTray() {
|
export function initTray() {
|
||||||
|
const trayIcon = createTrayIcon();
|
||||||
tray = new Tray(trayIcon);
|
tray = new Tray(trayIcon);
|
||||||
updateTrayMenu();
|
updateTrayMenu();
|
||||||
tray.setToolTip("Stoat for Desktop");
|
tray.setToolTip("Stoat for Desktop");
|
||||||
|
|||||||
@@ -13,4 +13,6 @@ contextBridge.exposeInMainWorld("native", {
|
|||||||
minimise: () => ipcRenderer.send("minimise"),
|
minimise: () => ipcRenderer.send("minimise"),
|
||||||
maximise: () => ipcRenderer.send("maximise"),
|
maximise: () => ipcRenderer.send("maximise"),
|
||||||
close: () => ipcRenderer.send("close"),
|
close: () => ipcRenderer.send("close"),
|
||||||
|
|
||||||
|
setBadgeCount: (count: number) => ipcRenderer.send("setBadgeCount", count),
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -0,0 +1,21 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# Check if we're on NixOS and set up electron path if needed
|
||||||
|
if [ -f /etc/NIXOS ] || [ -n "$NIX_STORE" ]; then
|
||||||
|
# We're on NixOS, need to find the electron path
|
||||||
|
# Try to find electron in nix store matching our version requirement
|
||||||
|
REQUIRED_VERSION=$(grep '"electron"' package.json | sed -E 's/.*"electron"[[:space:]]*:[[:space:]]*"([0-9]+)\..*/\1/')
|
||||||
|
|
||||||
|
# Search for electron in nix store
|
||||||
|
ELECTRON_PATH=$(ls -d /nix/store/*electron-${REQUIRED_VERSION}* 2>/dev/null | grep -v -E '(unwrapped|\.drv$)' | head -1)
|
||||||
|
|
||||||
|
if [ -n "$ELECTRON_PATH" ] && [ -d "$ELECTRON_PATH/bin" ]; then
|
||||||
|
export ELECTRON_OVERRIDE_DIST_PATH="$ELECTRON_PATH/bin"
|
||||||
|
echo "NixOS detected: Using electron from $ELECTRON_PATH/bin"
|
||||||
|
else
|
||||||
|
echo "Warning: Could not find electron ${REQUIRED_VERSION} in nix store"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Run electron-forge directly to avoid recursion
|
||||||
|
exec npx electron-forge start "$@"
|
||||||
Reference in New Issue
Block a user