alpha.yml 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. name: Alpha CI
  2. on:
  3. workflow_dispatch:
  4. env:
  5. CARGO_INCREMENTAL: 0
  6. RUST_BACKTRACE: short
  7. jobs:
  8. release:
  9. strategy:
  10. fail-fast: false
  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@v2
  26. with:
  27. workspaces: src-tauri
  28. - name: Install Node
  29. uses: actions/setup-node@v1
  30. with:
  31. node-version: 16
  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 libgtk-3-dev webkit2gtk-4.0 libappindicator3-dev librsvg2-dev patchelf
  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@v0
  54. env:
  55. GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  56. TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
  57. TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}
  58. with:
  59. tagName: alpha
  60. releaseName: "Clash Verge Alpha"
  61. releaseBody: "Alpha Version (include debug)"
  62. releaseDraft: false
  63. includeDebug: true
  64. prerelease: true
  65. # - name: Portable Bundle
  66. # if: matrix.os == 'windows-latest'
  67. # run: |
  68. # yarn run portable
  69. # env:
  70. # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}