From c0e3e5f56975e31fd62107bd62d5c6ce10055741 Mon Sep 17 00:00:00 2001 From: Ran Luo Date: Wed, 24 Jun 2026 00:42:33 +0800 Subject: [PATCH 1/2] fix(desktop): type renderer plugins array as PluginOption[] (#4667) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit vue-tsc fails with TS2769 (no overload matches) on the renderer `plugins: [vue(), svgLoader()]` array after the vite 7 bump — the plugin packages carry their own vite type copies, so the element types no longer line up with electron-vite's expected PluginOption[]. Cast the array to vite's PluginOption[] to restore the typecheck. Co-authored-by: Claude Opus 4.8 (1M context) --- packages/desktop/electron.vite.config.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/desktop/electron.vite.config.ts b/packages/desktop/electron.vite.config.ts index 417985ec94..5cd88b0cc9 100644 --- a/packages/desktop/electron.vite.config.ts +++ b/packages/desktop/electron.vite.config.ts @@ -1,4 +1,5 @@ import { resolve, dirname } from 'path' +import type { PluginOption } from 'vite' import { defineConfig } from 'electron-vite' import vue from '@vitejs/plugin-vue' import svgLoader from 'vite-svg-loader' @@ -94,7 +95,7 @@ export default defineConfig({ } } }, - plugins: [vue(), svgLoader()], + plugins: [vue(), svgLoader()] as PluginOption[], css: { postcss: { plugins: [ From 6a07b94ca05b9a7f3d0d33614ed39973d451ebe5 Mon Sep 17 00:00:00 2001 From: Ran Luo Date: Wed, 24 Jun 2026 01:01:52 +0800 Subject: [PATCH 2/2] fix(release): support immutable releases (draft-then-promote) + docs (#4666) * fix(release): publish as draft then promote for immutable releases action-gh-release publishes the release before uploading assets, which fails on repos with immutable releases enabled (assets cannot be added after a release is published). Create the release as a draft so assets attach, then promote it to published. Co-Authored-By: Claude Opus 4.8 (1M context) * docs(release): correct build matrix to 5 platforms Co-Authored-By: Claude Opus 4.8 (1M context) --------- Co-authored-by: Claude Opus 4.8 (1M context) --- .github/workflows/release.yml | 13 +++++++++++-- packages/website/content/docs/dev/RELEASE.md | 4 ++-- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index edd0011f19..5b6913a9f4 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -203,10 +203,14 @@ jobs: echo '```' } > release_body.md - - name: Publish release + # Immutable-release repos forbid adding assets to an already-published + # release, and action-gh-release publishes before uploading the assets. + # Create the release as a draft (assets allowed), then promote it to a + # published release in the next step. + - name: Create draft release with assets uses: softprops/action-gh-release@v2.6.2 with: - draft: false + draft: true prerelease: ${{ contains(github.ref_name, '-') }} generate_release_notes: true name: ${{ github.ref_name }} @@ -215,3 +219,8 @@ jobs: files: dist/* env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Promote draft to published release + run: gh release edit "${GITHUB_REF_NAME}" --draft=false --repo "${GITHUB_REPOSITORY}" + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/packages/website/content/docs/dev/RELEASE.md b/packages/website/content/docs/dev/RELEASE.md index 31b59238ae..9be9dfaf7d 100644 --- a/packages/website/content/docs/dev/RELEASE.md +++ b/packages/website/content/docs/dev/RELEASE.md @@ -1,6 +1,6 @@ # Releasing MarkText -The release pipeline is triggered by pushing a `v*` tag. The `Release MarkText` workflow (`.github/workflows/release.yml`) then runs **validate → build (4-platform matrix) → publish** and creates a GitHub Release with installers and `SHA256SUMS.txt`. +The release pipeline is triggered by pushing a `v*` tag. The `Release MarkText` workflow (`.github/workflows/release.yml`) then runs **validate → build (5-platform matrix) → publish** and creates a GitHub Release with installers and `SHA256SUMS.txt`. The flow below covers both release candidates and stable releases — same steps, only the version string differs. @@ -63,7 +63,7 @@ gh run list --workflow=release.yml --limit 3 gh run watch --exit-status ``` -Approximate timing: validate ~30 s · build matrix ~15–30 min (4 platforms in parallel) · publish ~1 min. +Approximate timing: validate ~30 s · build matrix ~15–30 min (5 platforms in parallel) · publish ~1 min. ## 7. Verify the published release