test.yml 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  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. env:
  15. CARGO_INCREMENTAL: 0
  16. RUST_BACKTRACE: short
  17. jobs:
  18. release:
  19. runs-on: ${{ github.event.inputs.os }}
  20. if: startsWith(github.repository, 'zzzgydi')
  21. steps:
  22. - name: Checkout repository
  23. uses: actions/checkout@v2
  24. - name: Install Rust
  25. uses: actions-rs/toolchain@v1
  26. with:
  27. toolchain: stable
  28. profile: minimal
  29. override: true
  30. - name: Install Node
  31. uses: actions/setup-node@v1
  32. with:
  33. node-version: 14
  34. - name: Install Dependencies (ubuntu only)
  35. if: github.event.inputs.os == 'ubuntu-latest'
  36. run: |
  37. sudo apt-get update
  38. sudo apt-get install -y libwebkit2gtk-4.0-dev build-essential curl wget libssl-dev libgtk-3-dev libappindicator3-dev librsvg2-dev libappindicator
  39. - name: Get yarn cache dir path
  40. id: yarn-cache-dir-path
  41. run: echo "::set-output name=dir::$(yarn cache dir)"
  42. - name: Yarn Cache
  43. uses: actions/cache@v2
  44. id: yarn-cache
  45. with:
  46. path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
  47. key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
  48. restore-keys: |
  49. ${{ runner.os }}-yarn-
  50. - name: Yarn install and check
  51. run: |
  52. yarn install --network-timeout 1000000
  53. yarn run check
  54. - name: Tauri build
  55. uses: tauri-apps/tauri-action@0e558392ccadcb49bcc89e7df15a400e8f0c954d
  56. env:
  57. GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  58. TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
  59. TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}