feat:更新CI及文档

This commit is contained in:
ASLant committed 2025-11-12 18:57:16 +08:00
1 parent c3abd42d69
commit bc2d43f48c
6 files changed
+184 -1

No files matched your search

+56
View File
@@ -0,0 +1,56 @@
name: Build
on:
push:
branches: [ main, master ]
pull_request:
branches: [ main, master ]
env:
CARGO_TERM_COLOR: always
jobs:
build:
strategy:
fail-fast: false
matrix:
platform:
- os: windows-latest
target: x86_64-pc-windows-msvc
name: Windows x64
runs-on: ${{ matrix.platform.os }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.platform.target }}
- name: Rust cache
uses: Swatinem/rust-cache@v2
with:
workspaces: './src-tauri -> target'
- name: Install Tauri CLI
run: cargo install tauri-cli --version "^2.0.0" --locked
- name: Build Tauri app
working-directory: ./src-tauri
run: cargo tauri build --verbose
- name: Upload artifacts (Windows)
if: matrix.platform.os == 'windows-latest'
uses: actions/upload-artifact@v4
with:
name: upx-gui-${{ matrix.platform.name }}
path: |
src-tauri/target/release/bundle/msi/*.msi
src-tauri/target/release/bundle/nsis/*.exe
if-no-files-found: warn
+38
View File
@@ -0,0 +1,38 @@
name: CI
on:
push:
branches: [ main, master ]
pull_request:
branches: [ main, master ]
env:
CARGO_TERM_COLOR: always
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
- name: Rust cache
uses: Swatinem/rust-cache@v2
with:
workspaces: './src-tauri -> target'
- name: Check formatting
working-directory: ./src-tauri
run: cargo fmt --all -- --check
- name: Run clippy
working-directory: ./src-tauri
run: cargo clippy --all-targets --all-features -- -D warnings
- name: Run tests
working-directory: ./src-tauri
run: cargo test
+78
View File
@@ -0,0 +1,78 @@
name: Release
on:
push:
tags:
- 'v*'
permissions:
contents: write
env:
CARGO_TERM_COLOR: always
jobs:
release:
strategy:
fail-fast: false
matrix:
platform:
- os: windows-latest
target: x86_64-pc-windows-msvc
name: Windows-x64
runs-on: ${{ matrix.platform.os }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.platform.target }}
- name: Rust cache
uses: Swatinem/rust-cache@v2
with:
workspaces: './src-tauri -> target'
- name: Install Tauri CLI
run: cargo install tauri-cli --version "^2.0.0" --locked
- name: Build Tauri app
working-directory: ./src-tauri
run: cargo tauri build --verbose
- name: Get version from tag
id: get_version
shell: bash
run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT
- name: Prepare release files (Windows)
if: matrix.platform.os == 'windows-latest'
shell: pwsh
run: |
New-Item -Path "release" -ItemType Directory -Force
# 复制文件
Get-ChildItem -Path "src-tauri/target/release/bundle/msi/*.msi" -ErrorAction SilentlyContinue | ForEach-Object {
Copy-Item $_.FullName -Destination "release/"
}
Get-ChildItem -Path "src-tauri/target/release/bundle/nsis/*.exe" -ErrorAction SilentlyContinue | ForEach-Object {
Copy-Item $_.FullName -Destination "release/"
}
Get-ChildItem -Path "release/" -Recurse | ForEach-Object { Write-Host $_.Name }
- name: Upload release assets
uses: softprops/action-gh-release@v2
with:
files: release/*
draft: false
prerelease: false
generate_release_notes: true
fail_on_unmatched_files: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+12 -1
View File
@@ -1,9 +1,20 @@
# UPX-GUI
一个基于 Tauri 开发的 UPX 压缩工具图形界面。
一个基于 Tauri 开发的 UPX 压缩工具图形界面,小而美。
## 应用截图
### 主界面
![主界面](img/index.png)
### 设置界面
![设置界面](img/setting.png)
## 功能特性
- 界面美观:基于现代化 UI 设计,简洁直观的操作界面
- 体积轻量:应用程序体积小,启动速度快,资源占用低
- 文件压缩:支持对 EXE 和 DLL 文件进行压缩加壳
- 文件解压:支持对已压缩的文件进行解压脱壳
- 批量处理:支持选择文件夹批量处理多个文件
BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 328 KiB

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 194 KiB