123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122 |
- name: Release CI
- on:
- push:
- tags:
- - v**
- 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') &&
- 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
- with:
- working-directory: src-tauri
- - name: Install Node
- uses: actions/setup-node@v1
- with:
- node-version: 14
- - name: Install Dependencies (ubuntu only)
- if: startsWith(matrix.os, 'ubuntu-')
- 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
- yarn run check
- - name: Tauri build
- uses: tauri-apps/tauri-action@0e558392ccadcb49bcc89e7df15a400e8f0c954d
- # enable cache even though failed
- # continue-on-error: true
- env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
- TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}
- with:
- tagName: v__VERSION__
- releaseName: "Clash Verge v__VERSION__"
- releaseBody: "More new features are now supported."
- releaseDraft: false
- prerelease: true
- - name: Portable Bundle
- if: matrix.os == 'windows-latest'
- # rebuild with env settings
- run: |
- yarn build
- yarn run portable
- env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
- TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}
- VITE_WIN_PORTABLE: 1
- release-update:
- needs: release
- runs-on: macos-latest
- if: |
- startsWith(github.repository, 'zzzgydi') &&
- startsWith(github.ref, 'refs/tags/v')
- 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 install
- - name: Release updater file
- run: yarn run updater
- env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|