compatible.yml 2.9 KB

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