chore: bump maa-cli to v0.4.0 (#7996)

* chore: bump `maa-cli` to `v0.4.0`

* docs: 更新 CLI 使用指南

* ci: build cli for appimage only with git2 feature

* ci: build CLI with vendored openssl on aarch64
This commit is contained in:
Loong
2024-01-15 18:31:16 +08:00
committed by GitHub
parent f083059e0b
commit f8e6b0e982
3 changed files with 192 additions and 54 deletions

View File

@@ -224,19 +224,20 @@ jobs:
CC: ${{ matrix.arch == 'x86_64' && 'ccache gcc-12' || 'ccache aarch64-linux-gnu-gcc-12' }}
CXX: ${{ matrix.arch == 'x86_64' && 'ccache g++-12' || 'ccache aarch64-linux-gnu-g++-12' }}
- name: Install cross compile tool (CLI)
if: ${{ matrix.arch != 'x86_64' }}
uses: taiki-e/install-action@v2
- name: Setup Rust
uses: ./src/maa-cli/.github/actions/setup
with:
tool: cross
os: ubuntu-latest
arch: ${{ matrix.arch }}
- name: Build CLI
run: |
$CARGO_CMD build --release --locked --package maa-cli
cargo build --release --locked --package maa-cli \
${{ matrix.arch != 'x86_64' && '--features vendored-openssl' || '' }}
cp -v target/$CARGO_BUILD_TARGET/release/maa $GITHUB_WORKSPACE/install/maa
env:
CARGO_CMD: ${{ matrix.arch == 'x86_64' && 'cargo' || 'cross' }}
CARGO_BUILD_TARGET: ${{ matrix.arch }}-unknown-linux-gnu
cargo build --release --locked --package maa-cli --no-default-features \
--features ${{ matrix.arch != 'x86_64' && 'git2,vendored-openssl' || 'git2' }}
cp -v target/$CARGO_BUILD_TARGET/release/maa $GITHUB_WORKSPACE/appimage-maa
working-directory: src/maa-cli
- name: Build Appimage
@@ -250,6 +251,7 @@ jobs:
wget -c https://raw.githubusercontent.com/MaaAssistantArknights/design/main/logo/maa-logo_512x512.png -O Maa.AppDir/maa.png
mkdir -pv Maa.AppDir/usr/share/icons/hicolor/512x512/apps/
cp -v Maa.AppDir/maa.png Maa.AppDir/usr/share/icons/hicolor/512x512/apps/
cp -v appimage-maa Maa.AppDir/usr/share/maa/maa
chmod a+x Maa.AppDir/usr/share/maa/maa
cat > Maa.AppDir/maa.desktop <<EOF