alpha.yml 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. name: Alpha CI
  2. on:
  3. push:
  4. branches: [alpha]
  5. env:
  6. CARGO_INCREMENTAL: 0
  7. RUST_BACKTRACE: short
  8. jobs:
  9. release:
  10. strategy:
  11. matrix:
  12. os: [windows-latest, ubuntu-latest, macos-latest]
  13. runs-on: ${{ matrix.os }}
  14. if: startsWith(github.repository, 'zzzgydi')
  15. steps:
  16. - name: Checkout repository
  17. uses: actions/checkout@v2
  18. - name: Install Rust
  19. uses: actions-rs/toolchain@v1
  20. with:
  21. toolchain: stable
  22. profile: minimal
  23. override: true
  24. - name: Rust Cache
  25. uses: Swatinem/rust-cache@ce325b60658c1b38465c06cc965b79baf32c1e72
  26. with:
  27. working-directory: src-tauri
  28. - name: Install Node
  29. uses: actions/setup-node@v1
  30. with:
  31. node-version: 14
  32. - name: Install Dependencies (ubuntu only)
  33. if: matrix.os == 'ubuntu-latest'
  34. run: |
  35. sudo apt-get update
  36. 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
  37. - name: Get yarn cache dir path
  38. id: yarn-cache-dir-path
  39. run: echo "::set-output name=dir::$(yarn cache dir)"
  40. - name: Yarn Cache
  41. uses: actions/cache@v2
  42. id: yarn-cache
  43. with:
  44. path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
  45. key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
  46. restore-keys: |
  47. ${{ runner.os }}-yarn-
  48. - name: Yarn install and check
  49. run: |
  50. yarn install --network-timeout 1000000
  51. yarn run check
  52. - name: Tauri build
  53. uses: tauri-apps/tauri-action@743a37fd53cbdd122910b818b9bef7b7aa019134
  54. # enable cache even though failed
  55. continue-on-error: true
  56. env:
  57. VITE_MULTI_CORE: 1
  58. GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  59. TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
  60. TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}
  61. with:
  62. tagName: alpha
  63. releaseName: "Clash Verge Alpha"
  64. releaseBody: "Alpha Version"
  65. releaseDraft: true
  66. prerelease: true
  67. # - name: Portable Bundle
  68. # if: matrix.os == 'windows-latest'
  69. # run: |
  70. # yarn run portable
  71. # env:
  72. # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}