clash-verge-rev/.github/workflows/alpha.yml

85 lines
2.3 KiB
YAML
Raw Normal View History

2022-05-17 02:17:02 +08:00
name: Alpha CI
2022-05-17 02:11:29 +08:00
on:
push:
branches: [alpha]
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, 'zzzgydi')
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
override: true
- name: Rust Cache
uses: Swatinem/rust-cache@ce325b60658c1b38465c06cc965b79baf32c1e72
2022-05-17 12:34:30 +08:00
with:
working-directory: src-tauri
2022-05-17 02:11:29 +08:00
- name: Install Node
uses: actions/setup-node@v1
with:
node-version: 14
- name: Install Dependencies (ubuntu only)
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install -y libwebkit2gtk-4.0-dev build-essential curl wget libssl-dev libgtk-3-dev libappindicator3-dev librsvg2-dev libayatana-appindicator3-dev
- name: Get yarn cache dir path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- name: Yarn Cache
uses: actions/cache@v2
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Yarn install and check
run: |
yarn install --network-timeout 1000000
2022-06-01 00:43:57 +08:00
yarn run check
2022-05-17 02:11:29 +08:00
2022-06-01 00:43:57 +08:00
- name: Tauri build
2022-05-18 14:07:41 +08:00
uses: tauri-apps/tauri-action@743a37fd53cbdd122910b818b9bef7b7aa019134
2022-05-17 02:11:29 +08:00
# enable cache even though failed
2022-05-17 12:34:30 +08:00
continue-on-error: true
2022-05-17 02:11:29 +08:00
env:
VITE_MULTI_CORE: 1
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"
releaseBody: "Alpha Version"
2022-05-18 14:07:41 +08:00
releaseDraft: true
2022-05-17 02:11:29 +08:00
prerelease: true
2022-05-17 02:46:15 +08:00
2022-06-17 01:18:19 +08:00
# - name: Portable Bundle
# if: matrix.os == 'windows-latest'
# run: |
# yarn run portable
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}