2023-11-10 10:38:41 +08:00
|
|
|
name: Dev Build
|
2022-05-17 02:11:29 +08:00
|
|
|
|
2022-11-12 17:07:47 +08:00
|
|
|
on:
|
|
|
|
workflow_dispatch:
|
2023-11-10 10:38:41 +08:00
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- dev
|
2022-05-17 02:11:29 +08:00
|
|
|
|
|
|
|
env:
|
|
|
|
CARGO_INCREMENTAL: 0
|
|
|
|
RUST_BACKTRACE: short
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
release:
|
|
|
|
strategy:
|
|
|
|
matrix:
|
2023-11-10 10:38:41 +08:00
|
|
|
os: [windows-latest, ubuntu-latest, macos-latest]
|
|
|
|
|
2022-05-17 02:11:29 +08:00
|
|
|
runs-on: ${{ matrix.os }}
|
2023-11-22 02:56:47 +08:00
|
|
|
if: startsWith(github.repository, 'wonfen')
|
2022-05-17 02:11:29 +08:00
|
|
|
steps:
|
|
|
|
- name: Checkout repository
|
2023-11-02 20:14:05 +08:00
|
|
|
uses: actions/checkout@v4
|
2022-05-17 02:11:29 +08:00
|
|
|
|
2023-07-26 17:07:20 +08:00
|
|
|
- name: install Rust stable
|
|
|
|
uses: dtolnay/rust-toolchain@stable
|
2022-05-17 02:11:29 +08:00
|
|
|
|
|
|
|
- name: Rust Cache
|
2022-11-12 16:47:27 +08:00
|
|
|
uses: Swatinem/rust-cache@v2
|
2022-05-17 12:34:30 +08:00
|
|
|
with:
|
2022-11-12 16:47:27 +08:00
|
|
|
workspaces: src-tauri
|
2022-05-17 02:11:29 +08:00
|
|
|
|
|
|
|
- name: Install Node
|
2023-11-02 20:14:05 +08:00
|
|
|
uses: actions/setup-node@v4
|
2022-05-17 02:11:29 +08:00
|
|
|
with:
|
2023-11-10 10:38:41 +08:00
|
|
|
node-version: "20"
|
2023-11-13 14:49:28 +08:00
|
|
|
|
|
|
|
- uses: pnpm/action-setup@v2
|
|
|
|
name: Install pnpm
|
|
|
|
with:
|
|
|
|
version: 8
|
|
|
|
run_install: false
|
2022-05-17 02:11:29 +08:00
|
|
|
|
2023-03-16 13:18:05 +08:00
|
|
|
- name: Delete current release assets
|
2023-07-26 17:07:20 +08:00
|
|
|
if: startsWith(matrix.os, 'ubuntu-')
|
2023-03-16 13:18:05 +08:00
|
|
|
uses: mknejp/delete-release-assets@v1
|
|
|
|
with:
|
2023-11-22 14:52:14 +08:00
|
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
2023-11-13 14:49:28 +08:00
|
|
|
tag: dev
|
2023-03-16 13:18:05 +08:00
|
|
|
fail-if-no-assets: false
|
|
|
|
fail-if-no-release: false
|
|
|
|
assets: |
|
|
|
|
*.zip
|
|
|
|
*.gz
|
|
|
|
*.AppImage
|
|
|
|
*.deb
|
|
|
|
*.dmg
|
|
|
|
*.msi
|
|
|
|
*.sig
|
2023-10-11 14:31:44 +08:00
|
|
|
*.exe
|
2023-11-16 10:37:26 +08:00
|
|
|
*.json
|
2023-03-16 13:18:05 +08:00
|
|
|
|
2023-11-10 10:38:41 +08:00
|
|
|
- name: Install Dependencies (Ubuntu Only)
|
2023-01-18 23:39:27 +08:00
|
|
|
if: startsWith(matrix.os, 'ubuntu-')
|
2022-05-17 02:11:29 +08:00
|
|
|
run: |
|
2023-01-19 18:02:08 +08:00
|
|
|
sudo apt-get update
|
|
|
|
sudo apt-get install -y libgtk-3-dev webkit2gtk-4.0 libappindicator3-dev librsvg2-dev patchelf openssl
|
2022-05-17 02:11:29 +08:00
|
|
|
|
2023-11-13 14:49:28 +08:00
|
|
|
- name: Pnpm install and check
|
2022-05-17 02:11:29 +08:00
|
|
|
run: |
|
2023-11-13 14:49:28 +08:00
|
|
|
pnpm i
|
|
|
|
pnpm check
|
2022-05-17 02:11:29 +08:00
|
|
|
|
2022-06-01 00:43:57 +08:00
|
|
|
- name: Tauri build
|
2022-11-12 16:54:57 +08:00
|
|
|
uses: tauri-apps/tauri-action@v0
|
2022-05-17 02:11:29 +08:00
|
|
|
env:
|
2023-11-22 14:52:14 +08:00
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
2022-05-17 02:11:29 +08:00
|
|
|
TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
|
|
|
|
TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}
|
|
|
|
with:
|
2023-11-10 10:38:41 +08:00
|
|
|
tagName: dev
|
2023-11-22 06:48:30 +08:00
|
|
|
releaseName: "Clash Verge Dev"
|
2023-11-10 10:38:41 +08:00
|
|
|
releaseBody: "More new features are now supported."
|
2022-11-12 16:47:27 +08:00
|
|
|
releaseDraft: false
|
2022-05-17 02:11:29 +08:00
|
|
|
prerelease: true
|
2023-11-13 14:49:28 +08:00
|
|
|
tauriScript: pnpm
|
2023-11-10 10:38:41 +08:00
|
|
|
args: -f default-meta
|
2022-05-17 02:46:15 +08:00
|
|
|
|
2022-11-22 00:16:30 +08:00
|
|
|
- name: Portable Bundle
|
2023-11-11 15:00:54 +08:00
|
|
|
if: matrix.os == 'windows-latest'
|
2022-11-22 00:16:30 +08:00
|
|
|
run: |
|
2023-11-13 14:49:28 +08:00
|
|
|
pnpm portable
|
2022-11-22 00:16:30 +08:00
|
|
|
env:
|
2023-11-11 15:00:54 +08:00
|
|
|
TAG_NAME: dev
|
2023-11-22 14:52:14 +08:00
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
2022-11-24 11:14:03 +08:00
|
|
|
TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
|
|
|
|
TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}
|
|
|
|
VITE_WIN_PORTABLE: 1
|