2022-05-16 21:17:02 +03:00
|
|
|
name: Alpha CI
|
2022-05-16 21:11:29 +03:00
|
|
|
|
2022-11-12 12:07:47 +03:00
|
|
|
on:
|
|
|
|
workflow_dispatch:
|
2022-11-21 18:19:25 +03:00
|
|
|
inputs:
|
|
|
|
debug:
|
|
|
|
type: boolean
|
|
|
|
default: false
|
2022-05-16 21:11:29 +03:00
|
|
|
|
|
|
|
env:
|
|
|
|
CARGO_INCREMENTAL: 0
|
|
|
|
RUST_BACKTRACE: short
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
release:
|
|
|
|
strategy:
|
2022-11-12 11:47:27 +03:00
|
|
|
fail-fast: false
|
2022-05-16 21:11:29 +03:00
|
|
|
matrix:
|
2023-07-26 12:07:20 +03:00
|
|
|
os: [windows-latest, ubuntu-20.04, macos-latest]
|
2022-05-16 21:11:29 +03:00
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
if: startsWith(github.repository, 'zzzgydi')
|
|
|
|
steps:
|
|
|
|
- name: Checkout repository
|
2023-11-02 15:14:05 +03:00
|
|
|
uses: actions/checkout@v4
|
2022-05-16 21:11:29 +03:00
|
|
|
|
2023-07-26 12:07:20 +03:00
|
|
|
- name: install Rust stable
|
|
|
|
uses: dtolnay/rust-toolchain@stable
|
2022-05-16 21:11:29 +03:00
|
|
|
|
|
|
|
- name: Rust Cache
|
2022-11-12 11:47:27 +03:00
|
|
|
uses: Swatinem/rust-cache@v2
|
2022-05-17 07:34:30 +03:00
|
|
|
with:
|
2022-11-12 11:47:27 +03:00
|
|
|
workspaces: src-tauri
|
2022-05-16 21:11:29 +03:00
|
|
|
|
|
|
|
- name: Install Node
|
2023-11-02 15:14:05 +03:00
|
|
|
uses: actions/setup-node@v4
|
2022-05-16 21:11:29 +03:00
|
|
|
with:
|
2023-07-26 12:07:20 +03:00
|
|
|
node-version: "16"
|
|
|
|
cache: "yarn"
|
2022-05-16 21:11:29 +03:00
|
|
|
|
2023-03-16 08:18:05 +03:00
|
|
|
- name: Delete current release assets
|
2023-07-26 12:07:20 +03:00
|
|
|
if: startsWith(matrix.os, 'ubuntu-')
|
2023-03-16 08:18:05 +03:00
|
|
|
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-10-11 09:31:44 +03:00
|
|
|
*.exe
|
2023-03-16 08:18:05 +03:00
|
|
|
|
2022-05-16 21:11:29 +03:00
|
|
|
- name: Install Dependencies (ubuntu only)
|
2023-01-18 18:39:27 +03:00
|
|
|
if: startsWith(matrix.os, 'ubuntu-')
|
2022-05-16 21:11:29 +03:00
|
|
|
run: |
|
2023-01-19 13:02:08 +03:00
|
|
|
sudo apt-get update
|
|
|
|
sudo apt-get install -y libgtk-3-dev webkit2gtk-4.0 libappindicator3-dev librsvg2-dev patchelf openssl
|
2022-05-16 21:11:29 +03:00
|
|
|
|
|
|
|
- name: Yarn install and check
|
|
|
|
run: |
|
2023-07-26 12:07:20 +03:00
|
|
|
yarn install --network-timeout 1000000 --frozen-lockfile
|
2023-11-03 11:00:34 +03:00
|
|
|
yarn run check --force
|
2022-05-16 21:11:29 +03:00
|
|
|
|
2022-05-31 19:43:57 +03:00
|
|
|
- name: Tauri build
|
2022-11-12 11:54:57 +03:00
|
|
|
uses: tauri-apps/tauri-action@v0
|
2022-05-16 21:11:29 +03:00
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
|
|
|
|
TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}
|
|
|
|
with:
|
|
|
|
tagName: alpha
|
|
|
|
releaseName: "Clash Verge Alpha"
|
2022-11-12 11:47:27 +03:00
|
|
|
releaseBody: "Alpha Version (include debug)"
|
|
|
|
releaseDraft: false
|
2022-05-16 21:11:29 +03:00
|
|
|
prerelease: true
|
2023-03-16 18:54:14 +03:00
|
|
|
includeDebug: ${{ github.event.inputs.debug }}
|
2022-05-16 21:46:15 +03:00
|
|
|
|
2022-11-21 19:16:30 +03:00
|
|
|
- name: Portable Bundle
|
2023-07-26 12:07:20 +03:00
|
|
|
if: startsWith(matrix.os, 'windows-')
|
2022-11-21 19:16:30 +03:00
|
|
|
run: |
|
2023-03-16 18:54:14 +03:00
|
|
|
yarn build
|
2022-11-21 19:16:30 +03:00
|
|
|
yarn run portable
|
|
|
|
env:
|
|
|
|
TAG_NAME: alpha
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
2022-11-24 06:14:03 +03:00
|
|
|
TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
|
|
|
|
TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}
|
|
|
|
VITE_WIN_PORTABLE: 1
|