release.yml 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. name: Release Project
  2. on:
  3. push:
  4. tags:
  5. - v*
  6. jobs:
  7. build-tauri:
  8. strategy:
  9. fail-fast: false
  10. matrix:
  11. platform: [windows-latest]
  12. runs-on: ${{ matrix.platform }}
  13. steps:
  14. - uses: actions/checkout@v2
  15. - name: setup node
  16. uses: actions/setup-node@v1
  17. with:
  18. node-version: 14
  19. - name: install Rust stable
  20. uses: actions-rs/toolchain@v1
  21. with:
  22. toolchain: stable
  23. - name: Get yarn cache directory path
  24. id: yarn-cache-dir-path
  25. run: echo "::set-output name=dir::$(yarn cache dir)"
  26. - uses: actions/cache@v2
  27. id: yarn-cache
  28. with:
  29. path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
  30. key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
  31. restore-keys: |
  32. ${{ runner.os }}-yarn-
  33. - uses: actions/cache@v2
  34. with:
  35. path: |
  36. ~/.cargo/bin/
  37. ~/.cargo/registry/index/
  38. ~/.cargo/registry/cache/
  39. ~/.cargo/git/db/
  40. src-tauri/target/
  41. src-tauri/WixTools/
  42. key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
  43. - name: install app dependencies and build it
  44. run: yarn && yarn run predev
  45. - uses: tauri-apps/tauri-action@v0
  46. env:
  47. GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  48. with:
  49. tagName: v__VERSION__
  50. releaseName: "Clash Verge v__VERSION__"
  51. releaseBody: "This is a release."
  52. releaseDraft: true
  53. prerelease: false