You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

ci.yml 2.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. name: CI/CD
  2. on:
  3. push:
  4. branches:
  5. - release/*
  6. - hotfix/*
  7. tags:
  8. - v*
  9. pull_request:
  10. branches:
  11. - canary
  12. paths:
  13. - .github/workflows/*
  14. - src/*
  15. jobs:
  16. build:
  17. name: Build (${{ matrix.platform }})
  18. runs-on: ${{ matrix.os }}
  19. # Strategy
  20. # (variables for multiple platforms)
  21. # https://help.github.com/en/articles/workflow-syntax-for-github-actions#jobsjob_idstrategy
  22. strategy:
  23. fail-fast: false
  24. matrix:
  25. os:
  26. - ubuntu-latest
  27. - windows-latest
  28. - macOS-latest
  29. include:
  30. - os: ubuntu-latest # Ubuntu
  31. platform: ubuntu
  32. extension: snap
  33. - os: windows-latest # Windows
  34. platform: windows
  35. extension: exe
  36. - os: macOS-latest # macOS
  37. platform: macos
  38. extension: dmg
  39. steps:
  40. - name: Dump GitHub context
  41. if: false
  42. env:
  43. GITHUB_CONTEXT: ${{ toJson(github) }}
  44. run: echo "$GITHUB_CONTEXT"
  45. continue-on-error: true
  46. - name: Dump runner context
  47. if: false
  48. env:
  49. RUNNER_CONTEXT: ${{ toJson(runner) }}
  50. run: echo "$RUNNER_CONTEXT"
  51. continue-on-error: true
  52. - uses: actions/checkout@v1
  53. with:
  54. submodules: true
  55. - name: Use Node.js 12.x
  56. uses: actions/setup-node@v1
  57. with:
  58. node-version: 12.x
  59. - name: Use Yarn
  60. run: npm install -g yarn
  61. - name: Setup
  62. working-directory: src
  63. run: yarn install
  64. - name: Lint
  65. working-directory: src
  66. run: yarn lint
  67. - name: Build (Installer)
  68. working-directory: src
  69. env:
  70. GITHUB_SHA: ${{ github.sha }}
  71. run: yarn build
  72. - name: Build (Portable)
  73. working-directory: src
  74. env:
  75. BUILD_PORTABLE: true
  76. run: yarn build:electron
  77. - name: Release
  78. working-directory: src/scripts
  79. continue-on-error: true
  80. env:
  81. SECRET_KEY: ${{ secrets.SECRET_KEY }}
  82. GITHUB_TOKEN: ${{ secrets.TOKEN }}
  83. DREAMLINK_TOKEN: ${{ secrets.DREAMLINK_TOKEN }}
  84. GITHUB_SHA: ${{ github.sha }}
  85. GITHUB_REF: ${{ github.ref }}
  86. BUILD_PLATFORM: ${{ matrix.platform }}
  87. BUILD_EXTENSION: ${{ matrix.extension }}
  88. run: node release.js