2023-11-10 10:38:41 +08:00
|
|
|
name: Dev Build
|
|
|
|
|
|
|
|
on:
|
|
|
|
workflow_dispatch:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- dev
|
|
|
|
|
|
|
|
env:
|
|
|
|
CARGO_INCREMENTAL: 0
|
|
|
|
RUST_BACKTRACE: short
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
release:
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
os: [windows-latest, ubuntu-latest, macos-latest]
|
|
|
|
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
if: startsWith(github.repository, 'keiko233')
|
|
|
|
steps:
|
|
|
|
- name: Checkout repository
|
|
|
|
uses: actions/checkout@v3
|
|
|
|
|
|
|
|
- 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@v3
|
|
|
|
with:
|
|
|
|
node-version: "20"
|
|
|
|
cache: "yarn"
|
|
|
|
|
2023-11-11 22:27:28 +08:00
|
|
|
- name: Delete current release assets
|
|
|
|
if: startsWith(matrix.os, 'ubuntu-')
|
|
|
|
uses: mknejp/delete-release-assets@v1
|
|
|
|
with:
|
|
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
tag: alpha
|
|
|
|
fail-if-no-assets: false
|
|
|
|
fail-if-no-release: false
|
|
|
|
assets: |
|
|
|
|
*.zip
|
|
|
|
*.gz
|
|
|
|
*.AppImage
|
|
|
|
*.deb
|
|
|
|
*.dmg
|
|
|
|
*.msi
|
|
|
|
*.sig
|
|
|
|
|
2023-11-10 10:38:41 +08:00
|
|
|
- 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: Yarn install and check
|
|
|
|
run: |
|
|
|
|
yarn install --network-timeout 1000000 --frozen-lockfile
|
|
|
|
yarn run check
|
|
|
|
|
|
|
|
- name: Tauri build
|
|
|
|
uses: tauri-apps/tauri-action@v0
|
|
|
|
env:
|
2023-11-10 11:50:01 +08:00
|
|
|
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
|
2023-11-10 10:38:41 +08:00
|
|
|
TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
|
|
|
|
TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}
|
|
|
|
with:
|
|
|
|
tagName: dev
|
|
|
|
releaseName: "Clash Nyanpasu Dev"
|
|
|
|
releaseBody: "More new features are now supported."
|
|
|
|
releaseDraft: false
|
2023-11-11 15:00:54 +08:00
|
|
|
prerelease: true
|
2023-11-10 10:38:41 +08:00
|
|
|
args: -f default-meta
|
|
|
|
|
2023-11-11 15:00:54 +08:00
|
|
|
- name: Portable Bundle
|
|
|
|
if: matrix.os == 'windows-latest'
|
|
|
|
run: |
|
|
|
|
yarn build -f default-meta
|
|
|
|
yarn run portable
|
|
|
|
env:
|
|
|
|
TAG_NAME: dev
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
|
|
|
|
TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}
|
|
|
|
VITE_WIN_PORTABLE: 1
|