From 327b9a175762602f34b8687063f8e302de498919 Mon Sep 17 00:00:00 2001 From: GyDi Date: Sat, 8 Jan 2022 02:12:12 +0800 Subject: [PATCH] chore: enhance ci --- .github/workflows/release.yml | 38 +++++++++++++++++++---------------- package.json | 1 + 2 files changed, 22 insertions(+), 17 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9510021..f8287d9 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -13,38 +13,42 @@ jobs: platform: [windows-latest] runs-on: ${{ matrix.platform }} steps: - - uses: actions/checkout@v2 - - name: setup node + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Install Node uses: actions/setup-node@v1 with: node-version: 14 - - name: install Rust stable + + - name: Install Rust uses: actions-rs/toolchain@v1 with: toolchain: stable - - name: Get yarn cache directory path + profile: minimal + override: true + + - name: Get yarn cache dir path id: yarn-cache-dir-path run: echo "::set-output name=dir::$(yarn cache dir)" - - uses: actions/cache@v2 + + - 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- - - uses: actions/cache@v2 - with: - path: | - ~/.cargo/bin/ - ~/.cargo/registry/index/ - ~/.cargo/registry/cache/ - ~/.cargo/git/db/ - src-tauri/target/ - src-tauri/WixTools/ - key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} - - name: install app dependencies and build it + + - name: Rust Cache + uses: Swatinem/rust-cache@ce325b60658c1b38465c06cc965b79baf32c1e72 + + - name: Yarn install and check run: yarn && yarn run check - - uses: tauri-apps/tauri-action@v0 + + - name: Tauri build + uses: tauri-apps/tauri-action@v0 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: diff --git a/package.json b/package.json index 0d34964..67b5178 100644 --- a/package.json +++ b/package.json @@ -5,6 +5,7 @@ "scripts": { "dev": "cargo tauri dev", "build": "cargo tauri build", + "tauri": "tauri", "web:dev": "vite", "web:build": "tsc && vite build", "web:serve": "vite preview",