alpha.yml 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  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: Install ARM64 toolchain (windows only)
  38. if: startsWith(matrix.os, 'windows-')
  39. run: |
  40. rustup target add aarch64-pc-windows-msvc
  41. - name: Get yarn cache dir path
  42. id: yarn-cache-dir-path
  43. run: echo "::set-output name=dir::$(yarn cache dir)"
  44. - name: Yarn Cache
  45. uses: actions/cache@v2
  46. id: yarn-cache
  47. with:
  48. path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
  49. key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
  50. restore-keys: |
  51. ${{ runner.os }}-yarn-
  52. - name: Yarn install and check
  53. run: |
  54. yarn install --network-timeout 1000000
  55. yarn run check
  56. - name: Tauri build
  57. uses: tauri-apps/tauri-action@743a37fd53cbdd122910b818b9bef7b7aa019134
  58. # enable cache even though failed
  59. continue-on-error: true
  60. env:
  61. VITE_MULTI_CORE: 1
  62. GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  63. TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
  64. TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}
  65. with:
  66. tagName: alpha
  67. releaseName: "Clash Verge Alpha"
  68. releaseBody: "Alpha Version"
  69. releaseDraft: true
  70. prerelease: true
  71. - name: Tauri build arm64 (windows only)
  72. if: startsWith(matrix.os, 'windows-')
  73. uses: tauri-apps/tauri-action@0e558392ccadcb49bcc89e7df15a400e8f0c954d
  74. # enable cache even though failed
  75. # continue-on-error: true
  76. env:
  77. GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  78. TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
  79. TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}
  80. with:
  81. tagName: alpha
  82. releaseName: "Clash Verge Alpha"
  83. releaseBody: "Alpha Version"
  84. releaseDraft: true
  85. prerelease: true
  86. args: --target aarc64-pc-windows-msvc
  87. # - name: Portable Bundle
  88. # if: matrix.os == 'windows-latest'
  89. # run: |
  90. # yarn run portable
  91. # env:
  92. # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}