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/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: [ 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