Skip to content

Commit 265fc52

Browse files
committed
feat(ci): add macOS DMG installers to release workflow
Add DMG disk image creation for both Apple Silicon and Intel Mac builds using hdiutil. DMGs include Applications symlink for drag-to-install. Updated both READMEs with DMG download links and macOS install section. Made-with: Cursor
1 parent 37b3831 commit 265fc52

3 files changed

Lines changed: 103 additions & 7 deletions

File tree

.github/workflows/release.yml

Lines changed: 40 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -265,12 +265,25 @@ jobs:
265265
cp -R target/release/bundle/osx/Ferrite.app release/
266266
tar -czvf ferrite-macos-arm64.tar.gz -C release .
267267
268-
- name: Upload artifact
268+
- name: Create DMG installer
269+
run: |
270+
mkdir -p dmg-staging
271+
cp -R target/release/bundle/osx/Ferrite.app dmg-staging/
272+
ln -s /Applications dmg-staging/Applications
273+
hdiutil create -volname "Ferrite" -srcfolder dmg-staging -ov -format UDZO "ferrite-macos-arm64.dmg"
274+
275+
- name: Upload tar.gz artifact
269276
uses: actions/upload-artifact@v4
270277
with:
271278
name: ferrite-macos-arm64
272279
path: ferrite-macos-arm64.tar.gz
273280

281+
- name: Upload DMG artifact
282+
uses: actions/upload-artifact@v4
283+
with:
284+
name: ferrite-macos-arm64-dmg
285+
path: ferrite-macos-arm64.dmg
286+
274287
build-macos-intel:
275288
name: Build macOS (Intel)
276289
runs-on: macos-14 # Cross-compile to x86_64 from ARM64 runner
@@ -296,12 +309,25 @@ jobs:
296309
cp -R target/x86_64-apple-darwin/release/bundle/osx/Ferrite.app release/
297310
tar -czvf ferrite-macos-x64.tar.gz -C release .
298311
299-
- name: Upload artifact
312+
- name: Create DMG installer
313+
run: |
314+
mkdir -p dmg-staging
315+
cp -R target/x86_64-apple-darwin/release/bundle/osx/Ferrite.app dmg-staging/
316+
ln -s /Applications dmg-staging/Applications
317+
hdiutil create -volname "Ferrite" -srcfolder dmg-staging -ov -format UDZO "ferrite-macos-x64.dmg"
318+
319+
- name: Upload tar.gz artifact
300320
uses: actions/upload-artifact@v4
301321
with:
302322
name: ferrite-macos-x64
303323
path: ferrite-macos-x64.tar.gz
304324

325+
- name: Upload DMG artifact
326+
uses: actions/upload-artifact@v4
327+
with:
328+
name: ferrite-macos-x64-dmg
329+
path: ferrite-macos-x64.dmg
330+
305331
# NOTE: musl static build disabled - GUI apps with font rendering (freetype, fontconfig)
306332
# and graphics (X11/Wayland) dependencies cannot be easily built as static musl binaries.
307333
# The glibc build (Ubuntu 22.04) provides good compatibility across Linux distributions.
@@ -345,11 +371,21 @@ jobs:
345371
with:
346372
name: ferrite-macos-arm64
347373

374+
- name: Download macOS ARM64 DMG
375+
uses: actions/download-artifact@v4
376+
with:
377+
name: ferrite-macos-arm64-dmg
378+
348379
- name: Download macOS Intel artifact
349380
uses: actions/download-artifact@v4
350381
with:
351382
name: ferrite-macos-x64
352383

384+
- name: Download macOS Intel DMG
385+
uses: actions/download-artifact@v4
386+
with:
387+
name: ferrite-macos-x64-dmg
388+
353389
- name: Download signed PortableApps installer
354390
uses: actions/download-artifact@v4
355391
with:
@@ -374,6 +410,8 @@ jobs:
374410
ferrite-linux-x64.tar.gz
375411
ferrite-editor_amd64.deb
376412
ferrite-editor.x86_64.rpm
413+
ferrite-macos-arm64.dmg
377414
ferrite-macos-arm64.tar.gz
415+
ferrite-macos-x64.dmg
378416
ferrite-macos-x64.tar.gz
379417
FerriteMDPortable_*_English.paf.exe

README.md

Lines changed: 31 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,8 +176,10 @@ Download the latest release for your platform from [GitHub Releases](https://git
176176
| **Linux (Debian/Ubuntu)** | `ferrite-editor_amd64.deb` | For Debian, Ubuntu, Mint, Pop!_OS |
177177
| **Linux (Fedora/RHEL)** | `ferrite-editor.x86_64.rpm` | For Fedora, RHEL, CentOS, Rocky |
178178
| Linux | `ferrite-linux-x64.tar.gz` | Universal - works on any distro |
179-
| **macOS (Apple Silicon)** | `ferrite-macos-arm64.tar.gz` | For M1/M2/M3 Macs |
180-
| **macOS (Intel)** | `ferrite-macos-x64.tar.gz` | For Intel Macs |
179+
| **macOS (Apple Silicon)** | `ferrite-macos-arm64.dmg` | Recommended - drag to Applications (M1/M2/M3) |
180+
| macOS (Apple Silicon) | `ferrite-macos-arm64.tar.gz` | Alternative - contains Ferrite.app bundle |
181+
| **macOS (Intel)** | `ferrite-macos-x64.dmg` | Recommended - drag to Applications |
182+
| macOS (Intel) | `ferrite-macos-x64.tar.gz` | Alternative - contains Ferrite.app bundle |
181183

182184
<details>
183185
<summary><strong>Windows Installation</strong></summary>
@@ -277,6 +279,33 @@ tar -xzf ferrite-linux-x64.tar.gz
277279

278280
</details>
279281

282+
<details>
283+
<summary><strong>macOS Installation</strong></summary>
284+
285+
#### DMG Installer (Recommended)
286+
287+
Download the `.dmg` for your Mac:
288+
- **Apple Silicon** (M1/M2/M3/M4): `ferrite-macos-arm64.dmg`
289+
- **Intel**: `ferrite-macos-x64.dmg`
290+
291+
Open the DMG and drag `Ferrite.app` to the **Applications** folder. Launch from Launchpad or Spotlight.
292+
293+
#### From tar.gz (Alternative)
294+
295+
```bash
296+
# Apple Silicon
297+
tar -xzf ferrite-macos-arm64.tar.gz
298+
cp -R Ferrite.app /Applications/
299+
300+
# Intel
301+
tar -xzf ferrite-macos-x64.tar.gz
302+
cp -R Ferrite.app /Applications/
303+
```
304+
305+
> **Gatekeeper Note:** If macOS shows "app can't be opened because it is from an unidentified developer", right-click `Ferrite.app` and select **Open**, then click **Open** in the dialog. This is only needed once — macOS remembers your choice.
306+
307+
</details>
308+
280309
<details>
281310
<summary><strong>Build from Source</strong></summary>
282311

README.zh-CN.md

Lines changed: 32 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ Ferrite **不会**访问密码、浏览器数据,也不进行网络连接。
8888
|------------|------------|----------|
8989
| ![Raw Editor](assets/screenshots/raw-dark.png) | ![Split View](assets/screenshots/split-dark.png) | ![Zen Mode](assets/screenshots/zen-dark.png) |
9090

91-
> **v0.2.7(即将发布):** **维基链接****反向链接面板****Vim 模式**。首次启动**欢迎页****GitHub 风格提示框****Ctrl+滚轮缩放****格式化后保持选中****前言编辑器**。预览中渲染图片。**格式工具栏****侧边面板切换****Nix/NixOS flake 支持**Linux 门户对话框错误处理。macOS .app 包。20+ 问题修复,包括自动换行滚动、大选区崩溃、IME 退格键等。详见 [CHANGELOG.md](CHANGELOG.md)
91+
> **v0.2.7(最新):** **维基链接****反向链接面板****Vim 模式**。首次启动**欢迎页****GitHub 风格提示框****Ctrl+滚轮缩放****格式化后保持选中****前言编辑器**。预览中渲染图片。**格式工具栏****侧边面板切换****Nix/NixOS flake 支持**新安装包:**.deb****.rpm**macOS **.dmg****.app** 包。**单实例**文件打开。20+ 问题修复。详见 [CHANGELOG.md](CHANGELOG.md)
9292
9393
> 📦 **v0.2.6 亮点:** 全新自定义编辑器引擎与虚拟滚动(80MB 文件约 80MB 内存)、多光标编辑、代码折叠、IME/CJK 输入改进。
9494
@@ -176,8 +176,10 @@ Ferrite **不会**访问密码、浏览器数据,也不进行网络连接。
176176
| **Linux (Debian/Ubuntu)** | `ferrite-editor_amd64.deb` | Debian、Ubuntu、Mint、Pop!_OS |
177177
| **Linux (Fedora/RHEL)** | `ferrite-editor.x86_64.rpm` | Fedora、RHEL、CentOS、Rocky |
178178
| Linux | `ferrite-linux-x64.tar.gz` | 通用 — 适用于多数发行版 |
179-
| **macOS (Apple Silicon)** | `ferrite-macos-arm64.tar.gz` | M1/M2/M3 |
180-
| **macOS (Intel)** | `ferrite-macos-x64.tar.gz` | Intel Mac |
179+
| **macOS (Apple Silicon)** | `ferrite-macos-arm64.dmg` | 推荐 — 拖入"应用程序"即可 (M1/M2/M3) |
180+
| macOS (Apple Silicon) | `ferrite-macos-arm64.tar.gz` | 替代 — 包含 Ferrite.app |
181+
| **macOS (Intel)** | `ferrite-macos-x64.dmg` | 推荐 — 拖入"应用程序"即可 |
182+
| macOS (Intel) | `ferrite-macos-x64.tar.gz` | 替代 — 包含 Ferrite.app |
181183

182184
<details>
183185
<summary><strong>Windows 安装</strong></summary>
@@ -277,6 +279,33 @@ tar -xzf ferrite-linux-x64.tar.gz
277279

278280
</details>
279281

282+
<details>
283+
<summary><strong>macOS 安装</strong></summary>
284+
285+
#### DMG 安装包(推荐)
286+
287+
根据 Mac 类型下载 `.dmg`
288+
- **Apple Silicon**(M1/M2/M3/M4):`ferrite-macos-arm64.dmg`
289+
- **Intel**`ferrite-macos-x64.dmg`
290+
291+
打开 DMG,将 `Ferrite.app` 拖入**应用程序**文件夹。从启动台或 Spotlight 启动。
292+
293+
#### 从 tar.gz(替代)
294+
295+
```bash
296+
# Apple Silicon
297+
tar -xzf ferrite-macos-arm64.tar.gz
298+
cp -R Ferrite.app /Applications/
299+
300+
# Intel
301+
tar -xzf ferrite-macos-x64.tar.gz
302+
cp -R Ferrite.app /Applications/
303+
```
304+
305+
> **Gatekeeper 提示:** 若 macOS 显示"无法打开,因为它来自身份不明的开发者",右键点击 `Ferrite.app` 并选择**打开**,然后在对话框中点击**打开**。此操作仅需一次。
306+
307+
</details>
308+
280309
<details>
281310
<summary><strong>从源码构建</strong></summary>
282311

0 commit comments

Comments
 (0)