Skip to content

Repository files navigation

Markdown Workspace

Markdown Workspace is a desktop Markdown editor built with Electron, Vue, Pinia, Markdown-it, Highlight.js and Mermaid.

Development

npm ci
npm start

If Electron was installed without its binary, run:

node node_modules\electron\install.js

Checks

npx tsc --noEmit
npm run lint
npm run build:app

Local Packaging

npm run pack

Creates an unpacked app in release/win-unpacked/.

npm run dist

Creates the Windows NSIS installer, blockmap and update metadata in release/ without publishing.

Publish only these files manually:

  • Markdown-Workspace-<version>-x64.exe
  • Markdown-Workspace-<version>-x64.exe.blockmap
  • latest.yml

Do not upload these local/debug outputs manually:

  • win-unpacked/
  • builder-effective-config.yaml
  • builder-debug.yml

Publishing

There are two valid publishing flows. Use one of them, not both.

Option 1: GitHub Actions

Push a version tag:

git tag v1.0.3
git push origin v1.0.3

The tag starts .github/workflows/release.yml. The workflow runs npm run release on GitHub's Windows runner and publishes the required assets to GitHub Releases.

Do not run npm run dist before this flow. GitHub Actions builds from a clean checkout.

Option 2: Local Publish

Run this only if you want to publish from your machine:

$env:GH_TOKEN="your_github_token"
npm run release

npm run release builds the app and uploads the required assets directly to GitHub Releases. In this flow you do not need to push a tag first; electron-builder can create or update the GitHub release using the version from package.json.

For this project, GitHub Actions is preferred because local Windows builds can fail while extracting winCodeSign if symbolic links are not allowed.

GitHub Actions Secrets

GITHUB_TOKEN is provided automatically by GitHub Actions. Do not create it manually.

Optional Windows code-signing secrets:

  • WIN_CSC_LINK: URL or base64 content of a .pfx signing certificate.
  • WIN_CSC_KEY_PASSWORD: password for that .pfx certificate.

If you do not have a signing certificate, leave both secrets empty. The build can still publish an unsigned installer, but Windows SmartScreen may warn users.

Auto Updates

Auto-updates work only from an installed packaged app. The updater uses:

  • electron-updater in the Electron main process.
  • GitHub Releases as the provider.
  • latest.yml and *.blockmap generated by electron-builder.

Draft releases are ignored by the updater. The release must be published.

Troubleshooting

Electron uninstall

The npm package is present, but the Electron executable was not downloaded. Fix:

node node_modules\electron\install.js
npm start

Cannot create symbolic link while extracting winCodeSign

This is a local Windows permission problem in electron-builder, not an app build error. electron-builder downloads winCodeSign-*.7z, and 7-Zip tries to create symbolic links in:

%LOCALAPPDATA%\electron-builder\Cache\winCodeSign

Fix options:

  1. Enable Windows Developer Mode: Settings -> System -> For developers -> Developer Mode.
  2. Or run the terminal as Administrator.
  3. Delete the broken cache and retry:
Remove-Item -Recurse -Force "$env:LOCALAPPDATA\electron-builder\Cache\winCodeSign"
npm run dist

Русский

Markdown Workspace - настольный Markdown-редактор на Electron и Vue.

Разработка

npm ci
npm start

Проверки

npx tsc --noEmit
npm run lint
npm run build:app

Локальная сборка

npm run dist

Команда только собирает файлы в release/, но не публикует их.

Для ручной загрузки в GitHub Releases нужны только:

  • .exe
  • .exe.blockmap
  • latest.yml

win-unpacked/, builder-effective-config.yaml и builder-debug.yml - служебные файлы, их загружать не нужно.

Публикация

Есть два варианта. Используйте один, не оба сразу.

Вариант 1 - GitHub Actions:

git tag v1.0.3
git push origin v1.0.3

Tag запускает workflow. Workflow сам выполнит npm run release на GitHub runner. Перед этим не нужно запускать npm run dist.

Вариант 2 - локальная публикация:

$env:GH_TOKEN="your_github_token"
npm run release

В этом варианте npm run release сам собирает и публикует релиз через токен.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages