mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2024-11-16 19:56:50 +08:00
110 lines
2.7 KiB
YAML
110 lines
2.7 KiB
YAML
name: Release Build
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
push:
|
|
tags:
|
|
- v**
|
|
|
|
env:
|
|
CARGO_INCREMENTAL: 0
|
|
RUST_BACKTRACE: short
|
|
|
|
jobs:
|
|
release:
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
os: [windows-latest, ubuntu-latest, macos-latest]
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
if: startsWith(github.repository, 'wonfen')
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
|
|
- name: install Rust stable
|
|
uses: dtolnay/rust-toolchain@stable
|
|
|
|
- name: Rust Cache
|
|
uses: Swatinem/rust-cache@v2
|
|
with:
|
|
workspaces: src-tauri
|
|
|
|
- name: Install Node
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: "20"
|
|
|
|
- uses: pnpm/action-setup@v2
|
|
name: Install pnpm
|
|
with:
|
|
version: 8
|
|
run_install: false
|
|
|
|
- name: Install Dependencies (Ubuntu Only)
|
|
if: startsWith(matrix.os, 'ubuntu-')
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y libgtk-3-dev webkit2gtk-4.0 libappindicator3-dev librsvg2-dev patchelf openssl
|
|
|
|
- name: Pnpm install and check
|
|
run: |
|
|
pnpm i
|
|
pnpm check
|
|
|
|
- name: Tauri build
|
|
uses: tauri-apps/tauri-action@v0
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
|
|
TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}
|
|
with:
|
|
tagName: v__VERSION__
|
|
releaseName: "Clash Verge v__VERSION__"
|
|
releaseBody: "More new features are now supported."
|
|
releaseDraft: false
|
|
prerelease: false
|
|
tauriScript: pnpm
|
|
args: -f default-meta
|
|
|
|
- name: Portable Bundle
|
|
if: matrix.portable == true
|
|
run: |
|
|
pnpm build
|
|
pnpm portable
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
|
|
TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}
|
|
VITE_WIN_PORTABLE: 1
|
|
|
|
release-update:
|
|
needs: [release]
|
|
runs-on: ubuntu-latest
|
|
if: |
|
|
startsWith(github.repository, 'wonfen') &&
|
|
startsWith(github.ref, 'refs/tags/v')
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Install Node
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: "20"
|
|
|
|
- uses: pnpm/action-setup@v2
|
|
name: Install pnpm
|
|
with:
|
|
version: 8
|
|
run_install: false
|
|
|
|
- name: Pnpm install
|
|
run: pnpm i
|
|
|
|
- name: Release updater file
|
|
run: pnpm updater
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|