2022-01-16 14:27:41 +08:00
|
|
|
name: CI
|
|
|
|
|
|
|
|
on: [push]
|
|
|
|
|
|
|
|
env:
|
|
|
|
CARGO_INCREMENTAL: 0
|
|
|
|
RUST_BACKTRACE: short
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
release:
|
2022-01-16 14:30:49 +08:00
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
os: [windows-latest, macos-11]
|
|
|
|
runs-on: ${{ matrix.os }}
|
2022-01-16 14:27:41 +08:00
|
|
|
if: |
|
|
|
|
startsWith(github.repository, 'zzzgydi') &&
|
|
|
|
startsWith(github.ref, 'refs/tags/v')
|
|
|
|
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
|
|
|
|
|
|
|
|
- name: Install Node
|
|
|
|
uses: actions/setup-node@v1
|
|
|
|
with:
|
|
|
|
node-version: 14
|
|
|
|
|
|
|
|
- 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 && yarn run check
|
|
|
|
|
|
|
|
- name: Tauri build
|
|
|
|
uses: tauri-apps/tauri-action@v0
|
2022-01-16 16:03:53 +08:00
|
|
|
# enable cache even though failed
|
|
|
|
continue-on-error: true
|
2022-01-16 14:27:41 +08:00
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
with:
|
|
|
|
tagName: v__VERSION__
|
|
|
|
releaseName: "Clash Verge v__VERSION__"
|
|
|
|
releaseBody: "Clash Verge now supports Windows and macos(intel)."
|
|
|
|
releaseDraft: false
|
|
|
|
prerelease: true
|
2022-01-19 00:37:59 +08:00
|
|
|
|
2022-01-19 23:55:05 +08:00
|
|
|
release-update:
|
|
|
|
needs: release
|
2022-01-19 00:37:59 +08:00
|
|
|
runs-on: macos-11
|
2022-01-19 23:55:05 +08:00
|
|
|
if: |
|
|
|
|
startsWith(github.repository, 'zzzgydi') &&
|
|
|
|
startsWith(github.ref, 'refs/tags/v')
|
2022-01-19 00:37:59 +08:00
|
|
|
steps:
|
|
|
|
- name: Checkout repository
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
|
|
|
|
- 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
|
|
|
|
run: yarn
|
|
|
|
|
|
|
|
- name: Release update.json
|
|
|
|
run: yarn run release
|
|
|
|
continue-on-error: true
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|