Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 25506172f2 | |||
| 864571df56 | |||
| 2cf64b556f |
@@ -1,21 +1,12 @@
|
|||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
tags:
|
|
||||||
- "*"
|
|
||||||
branches:
|
branches:
|
||||||
- "**"
|
- "**"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-and-release:
|
build:
|
||||||
name: Build App
|
name: Build App
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: write
|
|
||||||
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
os: [ubuntu-latest, windows-latest, macos-latest]
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
@@ -38,11 +29,5 @@ jobs:
|
|||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: pnpm install
|
run: pnpm install
|
||||||
|
|
||||||
- name: Build or Publish
|
- name: Build
|
||||||
run: |
|
run: pnpm run package
|
||||||
if [[ "${{ startsWith(github.ref, 'refs/tags/') }}" == "true" ]]; then
|
|
||||||
pnpm run publish
|
|
||||||
else
|
|
||||||
pnpm run make
|
|
||||||
fi
|
|
||||||
shell: bash
|
|
||||||
|
|||||||
@@ -0,0 +1,43 @@
|
|||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- v*
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
release:
|
||||||
|
name: Publish App
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
os: [ubuntu-latest, windows-latest, macos-latest]
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Checkout assets
|
||||||
|
run: git -c submodule."assets".update=checkout submodule update --init assets
|
||||||
|
|
||||||
|
- name: Install pnpm
|
||||||
|
uses: pnpm/action-setup@v4
|
||||||
|
with:
|
||||||
|
run_install: false
|
||||||
|
|
||||||
|
- name: Install Node.js
|
||||||
|
uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version: 22
|
||||||
|
cache: "pnpm"
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: pnpm install
|
||||||
|
|
||||||
|
- name: Publish
|
||||||
|
run: pnpm run publish
|
||||||
|
env:
|
||||||
|
PLATFORM: ${{ matrix.os }}
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
+102
-87
@@ -21,6 +21,107 @@ const STRINGS = {
|
|||||||
|
|
||||||
const ASSET_DIR = "assets/desktop";
|
const ASSET_DIR = "assets/desktop";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Build targets for the desktop app
|
||||||
|
*/
|
||||||
|
const makers: ForgeConfig["makers"] = [
|
||||||
|
new MakerSquirrel({
|
||||||
|
name: STRINGS.name,
|
||||||
|
authors: STRINGS.author,
|
||||||
|
// todo: hoist this
|
||||||
|
iconUrl: `https://stoat.chat/app/assets/icon-DUSNE-Pb.ico`,
|
||||||
|
// todo: loadingGif
|
||||||
|
setupIcon: `${ASSET_DIR}/icon.ico`,
|
||||||
|
description: STRINGS.description,
|
||||||
|
exe: `${STRINGS.execName}.exe`,
|
||||||
|
setupExe: `${STRINGS.execName}-setup.exe`,
|
||||||
|
copyright: "Copyright (C) 2025 Revolt Platforms LTD",
|
||||||
|
}),
|
||||||
|
new MakerZIP({}),
|
||||||
|
];
|
||||||
|
|
||||||
|
// skip these makers in CI/CD
|
||||||
|
if (!process.env.PLATFORM) {
|
||||||
|
makers.push(
|
||||||
|
// must be manually built (freezes CI process)
|
||||||
|
// not much use in being published anyhow
|
||||||
|
new MakerAppX({
|
||||||
|
certPass: "",
|
||||||
|
packageExecutable: `app\\${STRINGS.execName}.exe`,
|
||||||
|
publisher: "CN=B040CC7E-0016-4AF5-957F-F8977A6CFA3B",
|
||||||
|
}),
|
||||||
|
// flatpak publishing should occur through flathub repos.
|
||||||
|
// this is just for testing purposes
|
||||||
|
new MakerFlatpak({
|
||||||
|
options: {
|
||||||
|
id: "chat.stoat.stoat-desktop",
|
||||||
|
description: STRINGS.description,
|
||||||
|
productName: STRINGS.name,
|
||||||
|
productDescription: STRINGS.description,
|
||||||
|
runtimeVersion: "21.08",
|
||||||
|
icon: `${ASSET_DIR}/icon.png`,
|
||||||
|
categories: ["Network"],
|
||||||
|
modules: [
|
||||||
|
// use the latest zypak -- Electron sandboxing for Flatpak
|
||||||
|
{
|
||||||
|
name: "zypak",
|
||||||
|
sources: [
|
||||||
|
{
|
||||||
|
type: "git",
|
||||||
|
url: "https://github.com/refi64/zypak",
|
||||||
|
tag: "v2025.09",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
finishArgs: [
|
||||||
|
// default arguments found by running
|
||||||
|
// DEBUG=electron-installer-flatpak* pnpm make
|
||||||
|
"--socket=x11",
|
||||||
|
"--share=ipc",
|
||||||
|
"--device=dri",
|
||||||
|
"--socket=pulseaudio",
|
||||||
|
"--filesystem=home",
|
||||||
|
"--env=TMPDIR=/var/tmp",
|
||||||
|
"--share=network",
|
||||||
|
"--talk-name=org.freedesktop.Notifications",
|
||||||
|
// add Unity talk name for badges
|
||||||
|
"--talk-name=com.canonical.Unity",
|
||||||
|
],
|
||||||
|
// files: [
|
||||||
|
// // is this necessary?
|
||||||
|
// // https://stackoverflow.com/q/79745700
|
||||||
|
// ...[16, 32, 64, 128, 256, 512].map(
|
||||||
|
// (size) =>
|
||||||
|
// [
|
||||||
|
// `assets/desktop/hicolor/${size}x${size}.png`,
|
||||||
|
// `/app/share/icons/hicolor/${size}x${size}/apps/chat.stoat.stoat-desktop.png`,
|
||||||
|
// ] as [string, string],
|
||||||
|
// ),
|
||||||
|
// [
|
||||||
|
// `assets/desktop/icon.svg`,
|
||||||
|
// `/app/share/icons/hicolor/scalable/apps/chat.stoat.stoat-desktop.svg`,
|
||||||
|
// ] as [string, string],
|
||||||
|
// ],
|
||||||
|
files: [],
|
||||||
|
} as MakerFlatpakOptionsConfig,
|
||||||
|
/* as Omit<
|
||||||
|
MakerFlatpakOptionsConfig,
|
||||||
|
"files"
|
||||||
|
> */
|
||||||
|
}),
|
||||||
|
// testing purposes
|
||||||
|
new MakerDeb({
|
||||||
|
options: {
|
||||||
|
productName: STRINGS.name,
|
||||||
|
productDescription: STRINGS.description,
|
||||||
|
categories: ["Network"],
|
||||||
|
icon: `${ASSET_DIR}/icon.png`,
|
||||||
|
},
|
||||||
|
}),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
const config: ForgeConfig = {
|
const config: ForgeConfig = {
|
||||||
packagerConfig: {
|
packagerConfig: {
|
||||||
asar: true,
|
asar: true,
|
||||||
@@ -33,93 +134,7 @@ const config: ForgeConfig = {
|
|||||||
// ],
|
// ],
|
||||||
},
|
},
|
||||||
rebuildConfig: {},
|
rebuildConfig: {},
|
||||||
makers: [
|
makers,
|
||||||
new MakerAppX({
|
|
||||||
packageExecutable: `app\\${STRINGS.execName}.exe`,
|
|
||||||
publisher: "CN=B040CC7E-0016-4AF5-957F-F8977A6CFA3B",
|
|
||||||
}),
|
|
||||||
new MakerSquirrel({
|
|
||||||
name: STRINGS.name,
|
|
||||||
authors: STRINGS.author,
|
|
||||||
// todo: hoist this
|
|
||||||
iconUrl: `https://stoat.chat/app/assets/icon-DUSNE-Pb.ico`,
|
|
||||||
// todo: loadingGif
|
|
||||||
setupIcon: `${ASSET_DIR}/icon.ico`,
|
|
||||||
description: STRINGS.description,
|
|
||||||
exe: `${STRINGS.execName}.exe`,
|
|
||||||
setupExe: `${STRINGS.execName}-setup.exe`,
|
|
||||||
copyright: "Copyright (C) 2025 Revolt Platforms LTD",
|
|
||||||
}),
|
|
||||||
new MakerZIP({}),
|
|
||||||
...[
|
|
||||||
new MakerFlatpak({
|
|
||||||
options: {
|
|
||||||
id: "chat.stoat.stoat-desktop",
|
|
||||||
description: STRINGS.description,
|
|
||||||
productName: STRINGS.name,
|
|
||||||
productDescription: STRINGS.description,
|
|
||||||
runtimeVersion: "21.08",
|
|
||||||
icon: `${ASSET_DIR}/icon.png`,
|
|
||||||
categories: ["Network"],
|
|
||||||
modules: [
|
|
||||||
// use the latest zypak -- Electron sandboxing for Flatpak
|
|
||||||
{
|
|
||||||
name: "zypak",
|
|
||||||
sources: [
|
|
||||||
{
|
|
||||||
type: "git",
|
|
||||||
url: "https://github.com/refi64/zypak",
|
|
||||||
tag: "v2025.09",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
],
|
|
||||||
finishArgs: [
|
|
||||||
// default arguments found by running
|
|
||||||
// DEBUG=electron-installer-flatpak* pnpm make
|
|
||||||
"--socket=x11",
|
|
||||||
"--share=ipc",
|
|
||||||
"--device=dri",
|
|
||||||
"--socket=pulseaudio",
|
|
||||||
"--filesystem=home",
|
|
||||||
"--env=TMPDIR=/var/tmp",
|
|
||||||
"--share=network",
|
|
||||||
"--talk-name=org.freedesktop.Notifications",
|
|
||||||
// add Unity talk name for badges
|
|
||||||
"--talk-name=com.canonical.Unity",
|
|
||||||
],
|
|
||||||
// files: [
|
|
||||||
// // is this necessary?
|
|
||||||
// // https://stackoverflow.com/q/79745700
|
|
||||||
// ...[16, 32, 64, 128, 256, 512].map(
|
|
||||||
// (size) =>
|
|
||||||
// [
|
|
||||||
// `assets/desktop/hicolor/${size}x${size}.png`,
|
|
||||||
// `/app/share/icons/hicolor/${size}x${size}/apps/chat.stoat.stoat-desktop.png`,
|
|
||||||
// ] as [string, string],
|
|
||||||
// ),
|
|
||||||
// [
|
|
||||||
// `assets/desktop/icon.svg`,
|
|
||||||
// `/app/share/icons/hicolor/scalable/apps/chat.stoat.stoat-desktop.svg`,
|
|
||||||
// ] as [string, string],
|
|
||||||
// ],
|
|
||||||
files: [],
|
|
||||||
} as MakerFlatpakOptionsConfig,
|
|
||||||
/* as Omit<
|
|
||||||
MakerFlatpakOptionsConfig,
|
|
||||||
"files"
|
|
||||||
> */
|
|
||||||
}),
|
|
||||||
].slice(0, 0), // disable Flatpak build
|
|
||||||
new MakerDeb({
|
|
||||||
options: {
|
|
||||||
productName: STRINGS.name,
|
|
||||||
productDescription: STRINGS.description,
|
|
||||||
categories: ["Network"],
|
|
||||||
icon: `${ASSET_DIR}/icon.png`,
|
|
||||||
},
|
|
||||||
}),
|
|
||||||
],
|
|
||||||
plugins: [
|
plugins: [
|
||||||
new VitePlugin({
|
new VitePlugin({
|
||||||
// `build` can specify multiple entry builds, which can be Main process, Preload scripts, Worker process, etc.
|
// `build` can specify multiple entry builds, which can be Main process, Preload scripts, Worker process, etc.
|
||||||
|
|||||||
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "stoat-desktop",
|
"name": "stoat-desktop",
|
||||||
"productName": "stoat-desktop",
|
"productName": "stoat-desktop",
|
||||||
"version": "1.1.0",
|
"version": "1.1.9",
|
||||||
"main": ".vite/build/main.js",
|
"main": ".vite/build/main.js",
|
||||||
"repository": "stoatchat/desktop",
|
"repository": "stoatchat/desktop",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
Reference in New Issue
Block a user