test.yml 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  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. steps:
  29. - name: System Version
  30. run: |
  31. echo ${{ github.event.inputs.os }}
  32. - name: Checkout repository
  33. uses: actions/checkout@v4
  34. - name: install Rust stable
  35. uses: dtolnay/rust-toolchain@stable
  36. - name: Rust Cache
  37. uses: Swatinem/rust-cache@v2
  38. with:
  39. workspaces: src-tauri
  40. - name: Install Node
  41. uses: actions/setup-node@v4
  42. with:
  43. node-version: "16"
  44. cache: "yarn"
  45. - name: Install Dependencies (ubuntu only)
  46. if: startsWith(github.event.inputs.os, 'ubuntu-')
  47. run: |
  48. sudo apt-get update
  49. sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libappindicator3-dev librsvg2-dev patchelf
  50. - name: Yarn install and check
  51. run: |
  52. yarn install --network-timeout 1000000 --frozen-lockfile
  53. yarn run check
  54. - name: Tauri build
  55. uses: tauri-apps/tauri-action@v0
  56. env:
  57. GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  58. TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
  59. TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}
  60. with:
  61. tagName: alpha
  62. releaseName: "Clash Verge Alpha"
  63. releaseBody: "Alpha Version (include debug)"
  64. releaseDraft: false
  65. includeUpdaterJson: false