Skip to content

chore(docs, components): 更新项目路线图和组件文件 #8

chore(docs, components): 更新项目路线图和组件文件

chore(docs, components): 更新项目路线图和组件文件 #8

Workflow file for this run

name: Build
on:
push:
branches:
- main
tags:
- 'v*'
pull_request:
workflow_dispatch:
permissions:
contents: write
jobs:
tag-version:
if: github.event_name == 'push' && github.ref == 'refs/heads/main' && !contains(github.event.head_commit.message, '[skip-release]')
runs-on: ubuntu-latest
outputs:
tag: ${{ steps.tag.outputs.tag }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Get version from tauri.conf.json
id: version
run: |
VERSION=$(jq -r '.version' src-tauri/tauri.conf.json)
echo "version=$VERSION" >> $GITHUB_OUTPUT
echo "Version: $VERSION"
- name: Create and push tag
id: tag
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
VERSION="${{ steps.version.outputs.version }}"
TAG="v$VERSION"
echo "tag=$TAG" >> $GITHUB_OUTPUT
git tag -f "$TAG"
git push origin "$TAG" --force
build:
needs: tag-version
if: |
always() &&
(github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') || needs.tag-version.result == 'success')
strategy:
fail-fast: false
matrix:
include:
- platform: 'macos-latest'
args: '--target aarch64-apple-darwin'
- platform: 'ubuntu-22.04'
args: ''
- platform: 'windows-latest'
args: ''
runs-on: ${{ matrix.platform }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install dependencies (Ubuntu only)
if: matrix.platform == 'ubuntu-22.04'
run: |
sudo apt-get update
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.1-dev libayatana-appindicator3-dev librsvg2-dev
- name: Rust toolchain install
uses: dtolnay/rust-toolchain@stable
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 9
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '22'
cache: 'pnpm'
- name: Install frontend dependencies
run: pnpm install --frozen-lockfile
- name: Build the app
uses: tauri-apps/tauri-action@v0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
args: ${{ matrix.args }}
releaseTag: ${{ needs.tag-version.outputs.tag || github.ref_name }}
releaseBody: 'See the assets to download and install this version.'
releaseDraft: false
prerelease: false