Compare commits

..

7 Commits

Author SHA1 Message Date
izzy 25506172f2 ci: separate build/publish (don't run build on all platforms)
ci: don't try to build AppX in CI/CD context
2025-10-08 21:01:06 +01:00
izzy 864571df56 fix: include empty cert pass 2025-10-08 17:51:45 +01:00
izzy 2cf64b556f ci: actually provide the github token secret 2025-10-08 17:41:31 +01:00
izzy 55ac9a4596 ci: ensure token can write (publish) to repo 2025-10-08 17:39:00 +01:00
izzy ec7adaafe3 chore: disable flatpak build because this was for testing anyways 2025-10-08 17:36:36 +01:00
izzy b1c702a033 ci: checkout assets 2025-10-08 17:31:12 +01:00
izzy 6e9ef636b6 ci: use pnpm specified in package.json 2025-10-08 17:29:18 +01:00
4 changed files with 95 additions and 46 deletions
+8 -19
View File
@@ -1,28 +1,23 @@
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
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
steps: steps:
- name: Checkout (with submodules) - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v4
with:
submodules: recursive - name: Checkout assets
run: git -c submodule."assets".update=checkout submodule update --init assets
- name: Install pnpm - name: Install pnpm
uses: pnpm/action-setup@v4 uses: pnpm/action-setup@v4
with: with:
version: 10
run_install: false run_install: false
- name: Install Node.js - name: Install Node.js
@@ -34,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
+43
View File
@@ -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 }}
+43 -26
View File
@@ -21,36 +21,37 @@ const STRINGS = {
const ASSET_DIR = "assets/desktop"; const ASSET_DIR = "assets/desktop";
const config: ForgeConfig = { /**
packagerConfig: { * Build targets for the desktop app
asar: true, */
const makers: ForgeConfig["makers"] = [
new MakerSquirrel({
name: STRINGS.name, name: STRINGS.name,
executableName: STRINGS.execName, authors: STRINGS.author,
icon: `${ASSET_DIR}/icon`, // todo: hoist this
// extraResource: [ iconUrl: `https://stoat.chat/app/assets/icon-DUSNE-Pb.ico`,
// // include all the asset files // todo: loadingGif
// ...globSync(ASSET_DIR + "/**/*"), setupIcon: `${ASSET_DIR}/icon.ico`,
// ], description: STRINGS.description,
}, exe: `${STRINGS.execName}.exe`,
rebuildConfig: {}, setupExe: `${STRINGS.execName}-setup.exe`,
makers: [ 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({ new MakerAppX({
certPass: "",
packageExecutable: `app\\${STRINGS.execName}.exe`, packageExecutable: `app\\${STRINGS.execName}.exe`,
publisher: "CN=B040CC7E-0016-4AF5-957F-F8977A6CFA3B", publisher: "CN=B040CC7E-0016-4AF5-957F-F8977A6CFA3B",
}), }),
new MakerSquirrel({ // flatpak publishing should occur through flathub repos.
name: STRINGS.name, // this is just for testing purposes
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({ new MakerFlatpak({
options: { options: {
id: "chat.stoat.stoat-desktop", id: "chat.stoat.stoat-desktop",
@@ -109,6 +110,7 @@ const config: ForgeConfig = {
"files" "files"
> */ > */
}), }),
// testing purposes
new MakerDeb({ new MakerDeb({
options: { options: {
productName: STRINGS.name, productName: STRINGS.name,
@@ -117,7 +119,22 @@ const config: ForgeConfig = {
icon: `${ASSET_DIR}/icon.png`, icon: `${ASSET_DIR}/icon.png`,
}, },
}), }),
], );
}
const config: ForgeConfig = {
packagerConfig: {
asar: true,
name: STRINGS.name,
executableName: STRINGS.execName,
icon: `${ASSET_DIR}/icon`,
// extraResource: [
// // include all the asset files
// ...globSync(ASSET_DIR + "/**/*"),
// ],
},
rebuildConfig: {},
makers,
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
View File
@@ -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": {