compatible.yml 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. name: Compatible CI
  2. on:
  3. workflow_dispatch:
  4. # push:
  5. # tags:
  6. # - v**
  7. env:
  8. CARGO_INCREMENTAL: 0
  9. RUST_BACKTRACE: short
  10. jobs:
  11. build:
  12. strategy:
  13. fail-fast: false
  14. matrix:
  15. targets:
  16. - tag: macOS-10.15
  17. os: macos-10.15
  18. - tag: Ubuntu18
  19. os: ubuntu-18.04
  20. - tag: Ubuntu22
  21. os: ubuntu-22.04
  22. runs-on: ${{ matrix.targets.os }}
  23. steps:
  24. - name: Checkout repository
  25. uses: actions/checkout@v2
  26. - name: Install Rust
  27. uses: actions-rs/toolchain@v1
  28. with:
  29. toolchain: stable
  30. profile: minimal
  31. override: true
  32. - name: Rust Cache
  33. uses: Swatinem/rust-cache@v2
  34. with:
  35. workspaces: src-tauri
  36. - name: Install Node
  37. uses: actions/setup-node@v1
  38. with:
  39. node-version: 16
  40. # - name: Install Dependencies (ubuntu18 only)
  41. # if: matrix.targets.os == 'ubuntu-18.04'
  42. # run: |
  43. # sudo apt-get update
  44. # 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
  45. - name: Install Dependencies (ubuntu22 only)
  46. if: startsWith(matrix.targets.os, 'ubuntu-')
  47. run: |
  48. sudo apt-get update
  49. sudo apt-get install -y libgtk-3-dev webkit2gtk-4.0 libappindicator3-dev librsvg2-dev patchelf
  50. - name: Get yarn cache dir path
  51. id: yarn-cache-dir-path
  52. run: echo "::set-output name=dir::$(yarn cache dir)"
  53. - name: Yarn Cache
  54. uses: actions/cache@v2
  55. id: yarn-cache
  56. with:
  57. path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
  58. key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
  59. restore-keys: |
  60. ${{ runner.os }}-yarn-
  61. - name: Yarn install and check
  62. run: |
  63. yarn install --network-timeout 1000000
  64. yarn run check
  65. - name: Tauri build
  66. uses: tauri-apps/tauri-action@v0
  67. env:
  68. GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  69. TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
  70. TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}
  71. with:
  72. tagName: ${{ matrix.targets.tag }}
  73. releaseName: "Compatible For ${{ matrix.targets.tag }}"
  74. releaseBody: "More new features are now supported."
  75. releaseDraft: false
  76. prerelease: false
  77. # - name: Portable Bundle
  78. # if: matrix.os == 'windows-latest'
  79. # # rebuild with env settings
  80. # run: |
  81. # yarn build
  82. # yarn run portable
  83. # env:
  84. # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  85. # TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
  86. # TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}
  87. # VITE_WIN_PORTABLE: 1