Skip to content
Open
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
6 changes: 0 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,32 +14,26 @@ jobs:
fail-fast: false
matrix:
include:
# Linux x86_64
- os: ubuntu-latest
name: linux
arch: x86_64
target: x86_64-unknown-linux-gnu
# Linux aarch64
- os: ubuntu-latest
name: linux
arch: aarch64
target: aarch64-unknown-linux-gnu
# Windows x86_64
- os: windows-latest
name: windows
arch: x86_64
target: x86_64-pc-windows-msvc
# Windows aarch64
- os: windows-latest
name: windows
arch: aarch64
target: aarch64-pc-windows-msvc
# macOS x86_64
- os: macos-latest
name: macos
arch: x86_64
target: x86_64-apple-darwin
# macOS aarch64
- os: macos-latest
name: macos
arch: aarch64
Expand Down
168 changes: 168 additions & 0 deletions .github/workflows/package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,168 @@
name: Cross-Platform Package

on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
package:
name: Package ${{ matrix.name }}-${{ matrix.arch }}
runs-on: ${{ matrix.runner }}
strategy:
fail-fast: false
matrix:
include:
- runner: ubuntu-24.04
name: linux
arch: x86_64
target: x86_64-unknown-linux-gnu
- runner: ubuntu-24.04-arm
name: linux
arch: aarch64
target: aarch64-unknown-linux-gnu
- runner: windows-latest
name: windows
arch: x86_64
target: x86_64-pc-windows-msvc
- runner: windows-11-arm
name: windows
arch: aarch64
target: aarch64-pc-windows-msvc
- runner: macos-15-intel
name: macos
arch: x86_64
target: x86_64-apple-darwin
- runner: macos-latest
name: macos
arch: aarch64
target: aarch64-apple-darwin

steps:
- uses: actions/checkout@v4

- name: Install Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
target: ${{ matrix.target }}

- uses: actions/cache@v4
with:
path: |
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
key: package-${{ runner.os }}-${{ matrix.arch }}-${{ hashFiles('**/Cargo.lock') }}

- name: Install Linux packaging dependencies
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y curl dpkg rpm
sudo apt-get install -y libxcb1-dev libxkbcommon-dev libxkbcommon-x11-dev libssl-dev zlib1g-dev

- name: Build release binary
run: cargo build --release --target ${{ matrix.target }}

- name: Package Linux artifacts
if: runner.os == 'Linux'
shell: bash
run: |
ARCH=${{ matrix.arch }} TARGET=${{ matrix.target }} packaging/linux/make-appimage.sh
ARCH=${{ matrix.arch }} TARGET=${{ matrix.target }} packaging/linux/make-deb.sh
ARCH=${{ matrix.arch }} TARGET=${{ matrix.target }} packaging/linux/make-rpm.sh

- name: Zip Linux packages
if: runner.os == 'Linux'
shell: bash
run: |
mkdir -p target/artifact-zips/${{ matrix.arch }}
for f in target/appimage/${{ matrix.arch }}/*.AppImage target/deb/${{ matrix.arch }}/*.deb target/rpm/${{ matrix.arch }}/*.rpm; do
[ -e "$f" ] || continue
base="$(basename "$f")"
zip -j "target/artifact-zips/${{ matrix.arch }}/${base}.zip" "$f"
done

- name: Package macOS artifact
if: runner.os == 'macOS'
shell: bash
run: |
ARCH=${{ matrix.arch }} TARGET=${{ matrix.target }} packaging/macos/make-dmg.sh

- name: Zip macOS packages
if: runner.os == 'macOS'
shell: bash
run: |
mkdir -p target/artifact-zips/${{ matrix.arch }}
for f in target/dmg/${{ matrix.arch }}/*.dmg; do
[ -e "$f" ] || continue
base="$(basename "$f")"
zip -j "target/artifact-zips/${{ matrix.arch }}/${base}.zip" "$f"
done

- name: Package Windows artifact
if: runner.os == 'Windows'
shell: pwsh
run: |
$env:ARCH = "${{ matrix.arch }}"
$env:TARGET = "${{ matrix.target }}"
$env:TERMUA_AUTO_INSTALL_WIX = "1"
powershell -ExecutionPolicy Bypass -File packaging/windows/make-msi.ps1

- name: Zip Windows packages
if: runner.os == 'Windows'
shell: pwsh
run: |
New-Item -ItemType Directory -Force -Path "target/artifact-zips/${{ matrix.arch }}" | Out-Null
Get-ChildItem "target/msi/${{ matrix.arch }}/*.msi" -ErrorAction SilentlyContinue | ForEach-Object {
Compress-Archive -Path $_.FullName -DestinationPath "target/artifact-zips/${{ matrix.arch }}/$($_.Name).zip" -Force
}

- name: Upload Linux AppImage artifact
if: runner.os == 'Linux'
uses: actions/upload-artifact@v4
with:
name: termua-linux-${{ matrix.arch }}-appimage
compression-level: 0
if-no-files-found: error
path: target/artifact-zips/${{ matrix.arch }}/*AppImage.zip

- name: Upload Linux deb artifact
if: runner.os == 'Linux'
uses: actions/upload-artifact@v4
with:
name: termua-linux-${{ matrix.arch }}-deb
compression-level: 0
if-no-files-found: error
path: target/artifact-zips/${{ matrix.arch }}/*.deb.zip

- name: Upload Linux rpm artifact
if: runner.os == 'Linux'
uses: actions/upload-artifact@v4
with:
name: termua-linux-${{ matrix.arch }}-rpm
compression-level: 0
if-no-files-found: error
path: target/artifact-zips/${{ matrix.arch }}/*.rpm.zip

- name: Upload macOS dmg artifact
if: runner.os == 'macOS'
uses: actions/upload-artifact@v4
with:
name: termua-macos-${{ matrix.arch }}-dmg
compression-level: 0
if-no-files-found: error
path: target/artifact-zips/${{ matrix.arch }}/*.dmg.zip

- name: Upload Windows msi artifact
if: runner.os == 'Windows'
uses: actions/upload-artifact@v4
with:
name: termua-windows-${{ matrix.arch }}-msi
compression-level: 0
if-no-files-found: error
path: target/artifact-zips/${{ matrix.arch }}/*.msi.zip
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,10 @@ You can download the binary from the [artifacts page](https://github.com/iamazy/
- [Alacritty](https://github.com/alacritty/alacritty): A cross-platform, OpenGL terminal emulator.
- [WezTerm](https://github.com/wezterm/wezterm): A GPU-accelerated cross-platform terminal emulator and multiplexer implemented in Rust.

### Contributing 🌳

Contributions welcome! If you find this useful, please 🌟 the repo — it helps others discover it.

### License 🚨

<a href="./LICENSE-AGPL"><img src="https://img.shields.io/badge/license-AGPL%203-blue.svg" alt="License" /></a>
4 changes: 4 additions & 0 deletions README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,10 @@ termua-relay --listen 127.0.0.1:7231
- [Wezterm](https://github.com/wezterm/wezterm): A GPU-accelerated cross-platform terminal emulator and
multiplexer and implemented in Rust

### 贡献 🌳

欢迎贡献!如果你觉得这个项目有用,请给仓库点个🌟 —— 这有助于让更多人发现它。

### License 🚨

<a href="./LICENSE-AGPL"><img src="https://img.shields.io/badge/license-AGPL%203-blue.svg" alt="License" /></a>
Binary file added assets/logo/termua.ico
Binary file not shown.
Binary file modified assets/screenshot/screenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading