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
3 changes: 2 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ jobs:
version: ${{ inputs.nativeboat-version || 'latest' }}
analyze: 'true'

# The executable needs the other files in the output folder, so only the
# whole folder is published, as a ZIP.
- name: Package output
shell: pwsh
env:
Expand All @@ -81,7 +83,6 @@ jobs:
Get-ChildItem -LiteralPath $env:OUTPUT -Recurse | Format-Table FullName, Length
$name = "MarkText-$env:MARKTEXT_REF-native-win-x64"
New-Item -ItemType Directory -Force release | Out-Null
Copy-Item -LiteralPath $env:EXECUTABLE -Destination "release/$name.exe"
Compress-Archive -Path (Join-Path $env:OUTPUT '*') -DestinationPath "release/$name.zip"
Get-ChildItem release | ForEach-Object {
"{0} {1}" -f (Get-FileHash -Algorithm SHA256 $_.FullName).Hash.ToLower(), $_.Name
Expand Down
8 changes: 7 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ jobs:
[NativeBoat $env:NATIVEBOAT](https://github.com/XTSoftwareLabs/nativeboat-release/releases/tag/$env:NATIVEBOAT).

The executable runs without Chromium, WebView2 or Node.js. Download the
``.exe`` to run it directly, or the ``.zip`` for the complete output folder.
``.zip``, extract the whole folder, and run ``MarkText.exe`` from it; the
executable needs the other files in that folder.
"@ | Set-Content -Encoding utf8NoBOM notes.md
$files = (Get-ChildItem release -File).FullName
gh release view $env:TAG --repo $env:GITHUB_REPOSITORY *> $null
Expand All @@ -61,6 +62,11 @@ jobs:
if ($exists) {
gh release edit $env:TAG --repo $env:GITHUB_REPOSITORY --notes-file notes.md
gh release upload $env:TAG @files --repo $env:GITHUB_REPOSITORY --clobber
# Remove files an earlier build published that this build does not.
$names = (Get-ChildItem release -File).Name
gh release view $env:TAG --repo $env:GITHUB_REPOSITORY --json assets --jq '.assets[].name' |
Where-Object { $_ -notin $names } |
ForEach-Object { gh release delete-asset $env:TAG $_ --repo $env:GITHUB_REPOSITORY --yes }
} else {
gh release create $env:TAG @files --repo $env:GITHUB_REPOSITORY --target $env:GITHUB_SHA `
--title "MarkText $env:TAG (native Windows)" --notes-file notes.md
Expand Down
8 changes: 3 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,6 @@ MarkText v0.20.0 native release against the official Electron build
| Threads | 111 | 8 | 93% fewer |
| Handles | 2,194 | 227 | 90% fewer |

The native build also ships as a single `.exe` that runs on its own, while
the Electron build needs its whole folder.

Measured on Windows 10 22H2 with an Intel Core i7-8750H and 8 GB of RAM,
opening a short Markdown file. Each figure is the median of three runs.
Memory, threads and handles are summed over all of the app's processes,
Expand All @@ -45,5 +42,6 @@ The [Build native MarkText](.github/workflows/build.yml) workflow:
dependencies,
3. compiles `packages/desktop` with the
[NativeBoat Build action](https://github.com/marketplace/actions/nativeboat-build) (`@v1`),
4. uploads the executable, a ZIP of the full output folder and
`SHA256SUMS.txt` as a workflow artifact.
4. uploads a ZIP of the full output folder and its `SHA256SUMS.txt` as a
workflow artifact. The executable needs the other files in that folder, so
it is not published on its own.
Loading