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.1KB

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