mirror of
https://github.com/BTMuli/TeyvatGuide.git
synced 2025-12-07 08:42:49 +08:00
👷 调整测试
This commit is contained in:
65
.github/workflows/test.yml
vendored
65
.github/workflows/test.yml
vendored
@@ -1,66 +1,15 @@
|
|||||||
name: Build Test
|
name: Build Test
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
|
||||||
inputs:
|
|
||||||
version:
|
|
||||||
description: "Version to build"
|
|
||||||
required: true
|
|
||||||
default: "0.1.0"
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
publish-tauri:
|
test_ssh:
|
||||||
permissions:
|
runs-on: ubuntu-latest
|
||||||
contents: write
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
settings:
|
|
||||||
- platform: windows-latest
|
|
||||||
args: "--verbose"
|
|
||||||
target: "windows"
|
|
||||||
- platform: macos-latest
|
|
||||||
args: "--target x86_64-apple-darwin"
|
|
||||||
target: "macos-intel"
|
|
||||||
- platform: macos-latest
|
|
||||||
args: "--target aarch64-apple-darwin"
|
|
||||||
target: "macos-arm"
|
|
||||||
runs-on: ${{ matrix.settings.platform }}
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
- name: Add Rust targets(macOS Intel)
|
- name: Setup SSH
|
||||||
if: matrix.settings.target == 'macos-intel'
|
uses: webfactory/ssh-agent@v0.5.3
|
||||||
run: rustup target add x86_64-apple-darwin
|
|
||||||
- name: Add Rust targets(macOS ARM)
|
|
||||||
if: matrix.settings.target == 'macos-arm'
|
|
||||||
run: rustup target add aarch64-apple-darwin
|
|
||||||
|
|
||||||
- name: Rust setup
|
|
||||||
uses: dtolnay/rust-toolchain@stable
|
|
||||||
- name: Rust cache
|
|
||||||
uses: swatinem/rust-cache@v2
|
|
||||||
with:
|
with:
|
||||||
workspaces: "./src-tauri -> target"
|
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
|
||||||
|
- name: Run SSH command
|
||||||
- name: setup node
|
run: ssh -T git@github.com
|
||||||
uses: actions/setup-node@v3
|
|
||||||
with:
|
|
||||||
node-version: 23.3.0
|
|
||||||
- name: setup pnpm
|
|
||||||
uses: pnpm/action-setup@v2
|
|
||||||
with:
|
|
||||||
version: 9.15.0
|
|
||||||
- name: Install frontend dependencies
|
|
||||||
run: pnpm install
|
|
||||||
|
|
||||||
- name: Build app
|
|
||||||
run: pnpm tauri build --verbose
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
TAURI_DIST_DIR: dist
|
|
||||||
TAURI_DEV: false
|
|
||||||
TAURI_VERSION: ${{ github.event.inputs.version }}
|
|
||||||
TAURI_TARGET: ${{ matrix.settings.target }}
|
|
||||||
TAURI_PLATFORM: ${{ matrix.settings.platform }}
|
|
||||||
TAURI_ARGS: ${{ matrix.settings.args }}
|
|
||||||
|
|||||||
Reference in New Issue
Block a user