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
178 changes: 178 additions & 0 deletions .github/workflows/release-preview-macos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,178 @@
name: Release macOS Preview

on:
schedule:
# GitHub Actions schedules are approximate and may be delayed by queueing.
- cron: "17 3 * * *"
workflow_dispatch:
inputs:
source_branch:
description: "Preview branch to build"
required: true
default: "preview/0.3.0"
type: string

permissions:
contents: read

concurrency:
group: release-preview-macos
cancel-in-progress: false

env:
PREVIEW_BRANCH: preview/0.3.0
PREVIEW_VERSION: 0.3.0
PREVIEW_TAG: preview-0.3.0

jobs:
build:
name: Build ${{ matrix.architecture }} preview
if: github.actor == github.repository_owner || github.event_name == 'schedule'
runs-on: macos-14
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
architecture:
- arm64
- x86_64

steps:
- name: Check out preview source
uses: actions/checkout@v7
with:
ref: ${{ github.event_name == 'workflow_dispatch' && inputs.source_branch || env.PREVIEW_BRANCH }}

- name: Record source revision
id: source
shell: bash
run: echo "sha=$(git rev-parse HEAD)" >> "$GITHUB_OUTPUT"

- name: Set up Swift
uses: swift-actions/setup-swift@v2
with:
swift-version: "6.2"

- name: Set up Rust target
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.architecture == 'arm64' && 'aarch64-apple-darwin' || 'x86_64-apple-darwin' }}

- name: Restore SwiftPM dependencies
uses: actions/cache@v6
with:
path: |
.build/checkouts
.build/repositories
~/.cache/org.swift.swiftpm
key: swiftpm-${{ runner.os }}-6.2-${{ hashFiles('Package.resolved') }}

- name: Restore Cargo dependencies
uses: actions/cache@v6
with:
path: |
~/.cargo/git
~/.cargo/registry
key: cargo-dependencies-${{ runner.os }}-${{ hashFiles('rust/Cargo.lock') }}

- name: Build and package the preview app
env:
LITHE_ARCH: ${{ matrix.architecture }}
LITHE_VERSION: ${{ env.PREVIEW_VERSION }}
LITHE_BUILD_NUMBER: ${{ github.run_number }}
run: |
./scripts/package-app.sh
./scripts/create-dmg.sh
dmg_name="Lithe-${LITHE_VERSION}-${LITHE_ARCH}.dmg"
(cd dist && shasum -a 256 "$dmg_name" > "$dmg_name.sha256")

- name: Verify the preview bundle and disk image
env:
LITHE_ARCH: ${{ matrix.architecture }}
LITHE_VERSION: ${{ env.PREVIEW_VERSION }}
run: |
app_path="dist/Lithe-${LITHE_ARCH}.app"
dmg_path="dist/Lithe-${LITHE_VERSION}-${LITHE_ARCH}.dmg"
codesign --verify --deep --strict "$app_path"
/usr/libexec/PlistBuddy -c "Print :CFBundleShortVersionString" "$app_path/Contents/Info.plist"
/usr/libexec/PlistBuddy -c "Print :CFBundleVersion" "$app_path/Contents/Info.plist"
lipo "$app_path/Contents/MacOS/Lithe" -verify_arch "$LITHE_ARCH"
hdiutil imageinfo "$dmg_path" > /dev/null
test -s "$dmg_path"
(cd dist && shasum -a 256 -c "Lithe-${LITHE_VERSION}-${LITHE_ARCH}.dmg.sha256")

- name: Upload preview artifacts
uses: actions/upload-artifact@v7
with:
name: macos-preview-${{ matrix.architecture }}
path: |
dist/Lithe-${{ env.PREVIEW_VERSION }}-${{ matrix.architecture }}.dmg
dist/Lithe-${{ env.PREVIEW_VERSION }}-${{ matrix.architecture }}.dmg.sha256
if-no-files-found: error
retention-days: 14

publish:
name: Publish rolling macOS preview
needs: build
runs-on: ubuntu-latest
permissions:
contents: write

steps:
- name: Check out preview source
uses: actions/checkout@v7
with:
ref: ${{ github.event_name == 'workflow_dispatch' && inputs.source_branch || env.PREVIEW_BRANCH }}

- name: Record source revision
id: source
shell: bash
run: echo "sha=$(git rev-parse HEAD)" >> "$GITHUB_OUTPUT"

- name: Download preview artifacts
uses: actions/download-artifact@v8
with:
pattern: macos-preview-*
path: dist
merge-multiple: true

- name: Verify downloaded preview artifacts
env:
LITHE_VERSION: ${{ env.PREVIEW_VERSION }}
shell: bash
run: |
for architecture in arm64 x86_64; do
(cd dist && shasum -a 256 -c "Lithe-${LITHE_VERSION}-${architecture}.dmg.sha256")
done

- name: Create or update rolling preview Release
env:
GH_TOKEN: ${{ github.token }}
RELEASE_TAG: ${{ env.PREVIEW_TAG }}
LITHE_VERSION: ${{ env.PREVIEW_VERSION }}
SOURCE_SHA: ${{ steps.source.outputs.sha }}
shell: bash
run: |
if ! gh release view "$RELEASE_TAG" --repo "$GITHUB_REPOSITORY" >/dev/null 2>&1; then
gh release create "$RELEASE_TAG" \
--repo "$GITHUB_REPOSITORY" \
--target "$SOURCE_SHA" \
--title "Lithe ${LITHE_VERSION} Preview" \
--notes "Rolling Preview build from ${SOURCE_SHA}. This release is replaced by the next scheduled build." \
--prerelease
else
gh release edit "$RELEASE_TAG" \
--repo "$GITHUB_REPOSITORY" \
--target "$SOURCE_SHA" \
--title "Lithe ${LITHE_VERSION} Preview" \
--notes "Rolling Preview build from ${SOURCE_SHA}. This release is replaced by the next scheduled build." \
--prerelease
fi

gh release upload "$RELEASE_TAG" \
"dist/Lithe-${LITHE_VERSION}-arm64.dmg" \
"dist/Lithe-${LITHE_VERSION}-arm64.dmg.sha256" \
"dist/Lithe-${LITHE_VERSION}-x86_64.dmg" \
"dist/Lithe-${LITHE_VERSION}-x86_64.dmg.sha256" \
--repo "$GITHUB_REPOSITORY" \
--clobber
26 changes: 23 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ See [Repository layout and shared boundaries](./docs/architecture/repository-lay
</a>
</td>
<td>
<a href="https://www.fastaitoken.com/"><strong>FastAI</strong></a> provides access to large language models and supports the development of Lithe. Thank you to FastAI for supporting this project!
<a href="https://www.fastaitoken.com/"><strong>FastAI</strong></a> provides convenient relay access to a range of leading large language models, making it easier to connect AI capabilities to everyday development workflows. Its support helps Lithe continue improving its AI-assisted experience. Thank you to FastAI for supporting this project!
</td>
</tr>
<tr>
Expand All @@ -243,7 +243,27 @@ See [Repository layout and shared boundaries](./docs/architecture/repository-lay
</a>
</td>
<td>
<a href="https://codezsy.com"><strong>CodeZ</strong></a> provides relay access to GPT-family models and supports the development of Lithe. Thank you to CodeZ for supporting this project!
<a href="https://codezsy.com"><strong>CodeZ</strong></a> focuses on stable relay access to GPT-family models, offering developers a straightforward way to integrate model APIs into their tools and projects. Its sponsorship contributes to the ongoing development and maintenance of Lithe. Thank you to CodeZ for supporting this project!
</td>
</tr>
<tr>
<td width="112" align="center">
<a href="https://api.axis.fan/register?aff=4EZFN7322WTH">
<img src="./docs/assets/sponsors/yuanliu-token.png" width="64" alt="Yuanliu Token">
</a>
</td>
<td>
<a href="https://api.axis.fan/register?aff=4EZFN7322WTH"><strong>Yuanliu Token</strong></a> offers relay access to multiple large language model APIs, giving developers a flexible entry point for experimenting with different models and building AI applications. Its sponsorship supports Lithe as the project expands and polishes its AI features. Thank you to Yuanliu Token for supporting this project!
</td>
</tr>
<tr>
<td width="112" align="center">
<a href="https://torchai.ai">
<img src="./docs/assets/sponsors/torchai.jpg" width="64" alt="TorchAI">
</a>
</td>
<td>
<a href="https://torchai.ai"><strong>TorchAI</strong></a> provides large language model relay services for developers who need convenient API access across coding, content, and automation scenarios. Its support helps sustain Lithe's development and exploration of practical AI-powered tools. Thank you to TorchAI for supporting this project!
</td>
</tr>
<tr>
Expand All @@ -253,7 +273,7 @@ See [Repository layout and shared boundaries](./docs/architecture/repository-lay
</a>
</td>
<td>
<a href="https://shu26.cfd/"><strong>Code GO</strong></a> provides relay access to Claude models and supports the development of Lithe. Thank you to Code GO for supporting this project!
<a href="https://shu26.cfd/"><strong>Code GO</strong></a> specializes in relay services for Claude models, helping users access capable coding and reasoning models with less setup overhead. Its support gives Lithe more room to refine model integration and developer workflows. Thank you to Code GO for supporting this project!
</td>
</tr>
</table>
Expand Down
26 changes: 23 additions & 3 deletions README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ open dist/Lithe.app
</a>
</td>
<td>
<a href="https://www.fastaitoken.com/"><strong>FastAI</strong></a> 提供大模型服务支持,并助力 Lithe 的开发。感谢 FastAI 对本项目的支持!
<a href="https://www.fastaitoken.com/"><strong>FastAI</strong></a> 提供多款主流大模型的便捷中转服务,让开发者可以更轻松地把 AI 能力接入日常开发流程。其支持也帮助 Lithe 持续完善 AI 辅助体验。感谢 FastAI 对本项目的支持!
</td>
</tr>
<tr>
Expand All @@ -237,7 +237,27 @@ open dist/Lithe.app
</a>
</td>
<td>
<a href="https://codezsy.com"><strong>CodeZ</strong></a> 提供 GPT 系列模型的中转支持,并支持 Lithe 的开发。感谢 CodeZ 对本项目的支持!
<a href="https://codezsy.com"><strong>CodeZ</strong></a> 专注于 GPT 系列模型的稳定中转,为开发者在工具和项目中集成模型 API 提供简单直接的选择。其赞助为 Lithe 的持续开发与维护提供了助力。感谢 CodeZ 对本项目的支持!
</td>
</tr>
<tr>
<td width="112" align="center">
<a href="https://api.axis.fan/register?aff=4EZFN7322WTH">
<img src="./docs/assets/sponsors/yuanliu-token.png" width="64" alt="元流 Token">
</a>
</td>
<td>
<a href="https://api.axis.fan/register?aff=4EZFN7322WTH"><strong>元流 Token</strong></a> 提供多种大语言模型 API 的中转接入,为开发者体验不同模型、构建 AI 应用提供灵活入口。其赞助支持 Lithe 持续拓展并优化 AI 相关功能。感谢元流 Token 对本项目的支持!
</td>
</tr>
<tr>
<td width="112" align="center">
<a href="https://torchai.ai">
<img src="./docs/assets/sponsors/torchai.jpg" width="64" alt="TorchAI">
</a>
</td>
<td>
<a href="https://torchai.ai"><strong>TorchAI</strong></a> 面向开发者提供大模型中转服务,便于在编程、内容生成和自动化等不同场景中调用模型 API。其支持帮助 Lithe 保持持续开发,并探索更实用的 AI 工具体验。感谢 TorchAI 对本项目的支持!
</td>
</tr>
<tr>
Expand All @@ -247,7 +267,7 @@ open dist/Lithe.app
</a>
</td>
<td>
<a href="https://shu26.cfd/"><strong>Code GO</strong></a> 提供 Claude 系列模型的中转支持,并支持 Lithe 的开发。感谢 Code GO 对本项目的支持!
<a href="https://shu26.cfd/"><strong>Code GO</strong></a> 主要提供 Claude 系列模型的中转服务,帮助用户以更低的接入成本使用擅长编程与推理的模型。其支持让 Lithe 能够继续打磨模型集成和开发者工作流。感谢 Code GO 对本项目的支持!
</td>
</tr>
</table>
Expand Down
25 changes: 25 additions & 0 deletions Resources/zh-Hans.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,31 @@
"Choose whether Lithe follows the system appearance or always uses a light or dark theme." = "选择跟随系统外观,或始终使用浅色或深色主题。";
"Choose a color theme and whether Lithe follows the system appearance." = "选择配色主题,并设置是否跟随系统外观。";
"Editor" = "编辑器";
"Keymap" = "快捷键";
"Customize shortcuts for Lithe actions. Changes apply immediately." = "自定义 Lithe 操作的快捷键,修改后立即生效。";
"Search actions or shortcuts" = "搜索操作或快捷键";
"Restore All Defaults" = "全部恢复默认";
"Not Assigned" = "未分配";
"Press shortcut…" = "请按下快捷键…";
"Shortcut needs Command, Control, or Option" = "快捷键需要包含 Command、Control 或 Option";
"Conflicts with %@" = "与 %@ 冲突";
"Shortcut is already assigned to this command" = "该命令已使用此快捷键";
"No matching commands" = "没有匹配的命令";
"Add Shortcut" = "添加快捷键";
"Save the active document" = "保存当前文档";
"Move to the next match in the active editor" = "跳转到当前编辑器中的下一个匹配项";
"Move to the previous match in the active editor" = "跳转到当前编辑器中的上一个匹配项";
"Navigate to a call site of the selected symbol" = "跳转到所选符号的调用位置";
"Navigate to an implementation of the selected symbol" = "跳转到所选符号的实现";
"Find references to the selected symbol" = "查找所选符号的引用";
"Find in Files" = "在项目中查找";
"Replace in Files" = "在项目中替换";
"Replace text across the workspace" = "替换工作区中的文本";
"Show or hide language diagnostics" = "显示或隐藏语言诊断";
"Toggle Tests" = "切换测试窗口";
"Show or hide language-neutral test runners" = "显示或隐藏通用测试运行器";
"Search Everywhere" = "全局搜索";
"Find files and actions" = "查找文件和操作";
"Terminal" = "终端";
"Updates" = "更新";
"AI & Commit" = "AI 与提交";
Expand Down
Loading
Loading