Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Publishes a GitHub release when a version tag is pushed (for example 0.1.0, the same as manifest.json's version).
# Builds on Windows from the tagged code after npm run check passes, then attaches the Obsidian plugin (zipped, and as
# loose files for tools that install plugins from releases) and Cortex Desktop for Windows (zipped).
# loose files for tools that install plugins from releases) and Cortex Desktop for Windows (installer and zipped).
name: Release

on:
Expand Down Expand Up @@ -32,6 +32,8 @@ jobs:
- run: npm ci --no-audit --no-fund
- run: npm run check
- run: npm run desktop:package
- name: Build the Windows installer from the packaged app
run: npx electron-builder --win nsis --prepackaged release/Cortex-win32-x64 --publish never
- name: Zip the plugin and the app
shell: pwsh
run: |
Expand All @@ -51,7 +53,8 @@ jobs:

### Downloads
- **cortex-VERSION.zip**: the Obsidian plugin. Unzip it into your vault's `.obsidian/plugins/` folder (it makes `.obsidian/plugins/cortex/`), reload Obsidian, then turn Cortex on under Settings › Community plugins.
- **Cortex-Desktop-VERSION-win-x64.zip**: Cortex Desktop for Windows. Unzip it anywhere and run `Cortex.exe`. It opens the "Obsidian Vault" folder in your Documents when that is a vault, and otherwise asks you to choose your vault folder. The app is not code-signed yet, so Windows SmartScreen may warn the first time (More info › Run anyway).
- **Cortex-Setup-VERSION.exe**: Cortex Desktop for Windows, the easy way. Run it, pick where to install, and open Cortex from the Start menu or desktop.
- **Cortex-Desktop-VERSION-win-x64.zip**: the same app without installing. Unzip it anywhere and run `Cortex.exe` from the `Cortex-win32-x64` folder. It opens the "Obsidian Vault" folder in your Documents when that is a vault, and otherwise asks you to choose your vault folder. The app is not code-signed yet, so Windows SmartScreen may warn the first time (More info › Run anyway).
- **main.js**, **manifest.json**, **styles.css**: the plugin files on their own, for tools that install Obsidian plugins from GitHub releases. The background agents also need `cortex-runner.js`, which is in the zip.

Cortex never rewrites or deletes your notes; see the README's Privacy section for what it reads and when it goes online.
Expand All @@ -60,4 +63,4 @@ jobs:
EOF
sed -i "s/VERSION/$v/g" out/notes.md
gh release create "$v" --verify-tag --title "Cortex $v" --notes-file out/notes.md \
"out/cortex-$v.zip" "out/Cortex-Desktop-$v-win-x64.zip" dist/main.js dist/manifest.json dist/styles.css
"out/cortex-$v.zip" "release/Cortex-Setup-$v.exe" "out/Cortex-Desktop-$v-win-x64.zip" dist/main.js dist/manifest.json dist/styles.css
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,11 @@ Cortex isn't in Obsidian's Community plugins browser yet, so updates are install

**Cortex Desktop** (Windows 10 or 11, x64)

A standalone window that runs the same code outside Obsidian. Download `Cortex-Desktop-<version>-win-x64.zip` (about 165 MB), unzip it anywhere and run `Cortex.exe` from the `Cortex-win32-x64` folder inside (Extract All puts that in one more folder named after the zip). It opens the `Obsidian Vault` folder in your Documents if that is a vault, and otherwise asks you to pick your vault folder.
A standalone window that runs the same code outside Obsidian. Download `Cortex-Setup-<version>.exe` (about 120 MB) and run it. It installs for your Windows user only (no admin), lets you pick the folder, and adds Cortex to the Start menu and desktop. Uninstall it from Settings › Apps; your vault and settings are left alone.

Rather not install anything? `Cortex-Desktop-<version>-win-x64.zip` (about 165 MB) is the same app: unzip it anywhere and run `Cortex.exe` from the `Cortex-win32-x64` folder inside (Extract All puts that in one more folder named after the zip).

Either way, it opens the `Obsidian Vault` folder in your Documents if that is a vault, and otherwise asks you to pick your vault folder.

The app isn't code-signed yet, so Windows SmartScreen may warn the first time. Click **More info › Run anyway**.

Expand Down
25 changes: 25 additions & 0 deletions electron-builder.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Wraps the folder from `npm run desktop:package` (release/Cortex-win32-x64) in a Windows installer:
# release/Cortex-Setup-<version>.exe. Used by `npm run desktop:installer`, which passes --prepackaged,
# so electron-builder doesn't repackage the app itself. Not signed yet.
appId: io.github.a21devs.cortex

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

electron-builder logs author is missed in the package.json. NSIS uses that as the publisher, so Settings > Apps shows Cortex with a blank Publisher, which looks a lot like malware next to a SmartScreen warning. Add "author": "A21-devs" to package.json (it doesn't affect the plugin build, manifest.json is separate).

productName: Cortex
directories:
output: release
win:
target:
- target: nsis
arch: [x64]
icon: src/desktop/assets/cortex.ico
artifactName: Cortex-Setup-${version}.${ext}
nsis:
oneClick: false
perMachine: false
allowToChangeInstallationDirectory: true
createDesktopShortcut: true
createStartMenuShortcut: true
shortcutName: Cortex
installerIcon: src/desktop/assets/cortex.ico
uninstallerIcon: src/desktop/assets/cortex.ico
# Cortex keeps its settings in %APPDATA%\Cortex and never writes into the vault; uninstalling leaves both alone.
deleteAppDataOnUninstall: false
publish: null
Loading