test.yml 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. name: Test CI
  2. on:
  3. workflow_dispatch:
  4. inputs:
  5. os:
  6. description: "Runs on OS"
  7. required: true
  8. default: windows-latest
  9. type: choice
  10. options:
  11. - windows-latest
  12. - ubuntu-latest
  13. - macos-latest
  14. - ubuntu-18.04
  15. - ubuntu-20.04
  16. - ubuntu-22.04
  17. - macos-10.15
  18. - macos-11
  19. - macos-12
  20. - windows-2019
  21. - windows-2022
  22. env:
  23. CARGO_INCREMENTAL: 0
  24. RUST_BACKTRACE: short
  25. jobs:
  26. release:
  27. runs-on: ${{ github.event.inputs.os }}
  28. if: startsWith(github.repository, 'zzzgydi')
  29. steps:
  30. - name: System Version
  31. run: |
  32. echo ${{ github.event.inputs.os }}
  33. - name: Checkout repository
  34. uses: actions/checkout@v3
  35. - name: install Rust stable
  36. uses: dtolnay/rust-toolchain@stable
  37. - name: Rust Cache
  38. uses: Swatinem/rust-cache@v2
  39. with:
  40. workspaces: src-tauri
  41. - name: Install Node
  42. uses: actions/setup-node@v3
  43. with:
  44. node-version: "16"
  45. cache: "yarn"
  46. - name: Install Dependencies (ubuntu only)
  47. if: startsWith(github.event.inputs.os, 'ubuntu-')
  48. run: |
  49. sudo apt-get update
  50. sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libappindicator3-dev librsvg2-dev patchelf
  51. - name: Yarn install and check
  52. run: |
  53. yarn install --network-timeout 1000000 --frozen-lockfile
  54. yarn run check
  55. - name: Tauri build
  56. uses: tauri-apps/tauri-action@v0
  57. env:
  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 (include debug)"
  65. releaseDraft: false
  66. includeUpdaterJson: false