mirror of
https://github.com/xxnuo/MTranServer.git
synced 2026-09-03 06:35:20 +08:00
Update build.yml
This commit is contained in:
64
.github/workflows/build.yml
vendored
64
.github/workflows/build.yml
vendored
@@ -42,6 +42,37 @@ jobs:
|
||||
name: binaries
|
||||
path: dist/mtranserver-*
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Bun
|
||||
uses: oven-sh/setup-bun@v1
|
||||
with:
|
||||
bun-version: latest
|
||||
|
||||
- name: Install dependencies
|
||||
run: bun install
|
||||
|
||||
- name: Sync version from tag
|
||||
run: |
|
||||
if [[ "${{ github.ref }}" == refs/tags/v* ]]; then
|
||||
VERSION=${GITHUB_REF#refs/tags/}
|
||||
else
|
||||
VERSION=$(git describe --tags --abbrev=0 2>/dev/null || echo "v0.0.0")
|
||||
fi
|
||||
echo "Syncing version to ${VERSION}"
|
||||
bun run bump ${VERSION}
|
||||
|
||||
- name: Build Desktop
|
||||
run: bun run build:electron
|
||||
|
||||
- name: Upload Desktop Artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: desktop-${{ matrix.os }}
|
||||
path: release/mtranserver-desktop-*
|
||||
|
||||
release:
|
||||
needs: [build]
|
||||
runs-on: ubuntu-latest
|
||||
@@ -57,6 +88,13 @@ jobs:
|
||||
name: binaries
|
||||
path: release-assets
|
||||
|
||||
- name: Download Desktop Artifacts
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
pattern: desktop-*
|
||||
path: release-assets
|
||||
merge-multiple: true
|
||||
|
||||
- name: Determine Release Tag
|
||||
id: tag
|
||||
run: |
|
||||
@@ -89,7 +127,31 @@ jobs:
|
||||
fi
|
||||
|
||||
cat > release_body.md << 'EOF'
|
||||
${WARNING}## Server Binary
|
||||
${WARNING}## Desktop Client
|
||||
|
||||
| Platform | Architecture | Binary |
|
||||
|----------|-------------|--------|
|
||||
| Linux | x64 | [mtranserver-desktop-${VERSION}-linux-x64.AppImage](https://github.com/${REPO}/releases/download/${TAG}/mtranserver-desktop-${VERSION}-linux-x64.AppImage) |
|
||||
| Linux | arm64 | [mtranserver-desktop-${VERSION}-linux-arm64.AppImage](https://github.com/${REPO}/releases/download/${TAG}/mtranserver-desktop-${VERSION}-linux-arm64.AppImage) |
|
||||
| Linux | x64 (deb) | [mtranserver-desktop-${VERSION}-linux-x64.deb](https://github.com/${REPO}/releases/download/${TAG}/mtranserver-desktop-${VERSION}-linux-x64.deb) |
|
||||
| Linux | arm64 (deb) | [mtranserver-desktop-${VERSION}-linux-arm64.deb](https://github.com/${REPO}/releases/download/${TAG}/mtranserver-desktop-${VERSION}-linux-arm64.deb) |
|
||||
| Linux | x64 (rpm) | [mtranserver-desktop-${VERSION}-linux-x64.rpm](https://github.com/${REPO}/releases/download/${TAG}/mtranserver-desktop-${VERSION}-linux-x64.rpm) |
|
||||
| Linux | arm64 (rpm) | [mtranserver-desktop-${VERSION}-linux-arm64.rpm](https://github.com/${REPO}/releases/download/${TAG}/mtranserver-desktop-${VERSION}-linux-arm64.rpm) |
|
||||
| macOS | x64 | [mtranserver-desktop-${VERSION}-mac-x64.dmg](https://github.com/${REPO}/releases/download/${TAG}/mtranserver-desktop-${VERSION}-mac-x64.dmg) |
|
||||
| macOS | arm64 | [mtranserver-desktop-${VERSION}-mac-arm64.dmg](https://github.com/${REPO}/releases/download/${TAG}/mtranserver-desktop-${VERSION}-mac-arm64.dmg) |
|
||||
| Windows | x64 | [mtranserver-desktop-${VERSION}-win-x64.exe](https://github.com/${REPO}/releases/download/${TAG}/mtranserver-desktop-${VERSION}-win-x64.exe) |
|
||||
|
||||
> 桌面端启动后会创建一个托盘菜单,通过菜单可以方便的管理服务。
|
||||
|
||||
**macOS**: 拖动安装后,如果打开 MTranServer App 提示 "app is damaged",需要运行以下命令修复:
|
||||
|
||||
> If you see "app is damaged" error, run this command in Terminal App:
|
||||
|
||||
```bash
|
||||
sudo xattr -d com.apple.quarantine "/Applications/MTranServer.app"
|
||||
```
|
||||
|
||||
## Server Binary
|
||||
|
||||
| Platform | Architecture | Binary |
|
||||
|----------|-------------|--------|
|
||||
|
||||
Reference in New Issue
Block a user