Skip to content

Build Test

Build Test #9

Workflow file for this run

name: Build Test
on:
workflow_dispatch:
inputs:
version:
description: "Version to build"
required: true
default: "0.1.0"
jobs:
build-tauri:
permissions:
contents: write
strategy:
fail-fast: false
matrix:
settings:
- platform: windows-latest
args: ""
target: "windows"
bundlePath: msi/
- platform: macos-latest
args: "--target x86_64-apple-darwin"
target: "macos-intel"
bundlePath: macos/TeyvatGuide.app
- platform: macos-latest
args: "--target aarch64-apple-darwin"
target: "macos-arm"
bundlePath: macos/TeyvatGuide.app
runs-on: ${{ matrix.settings.platform }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup SSH
uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
- name: Add SSH known hosts
run: ssh-keyscan -t rsa github.com >> ~/.ssh/known_hosts
- name: Test SSH connection
run: ssh -T [email protected] || true
- name: Rust setup
uses: dtolnay/rust-toolchain@stable
- name: Add Rust targets(macOS Intel)
if: matrix.settings.target == 'macos-intel'
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: setup node
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 build -- ${{ matrix.settings.args }}
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: TeyvatGuide_v${{ github.event.inputs.version }}_${{ matrix.settings.target }}
path: src-tauri/target/release/bundle/${{ matrix.settings.bundlePath }}
if-no-files-found: error