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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  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. if: false
  44. env:
  45. GITHUB_CONTEXT: ${{ toJson(github) }}
  46. run: echo "$GITHUB_CONTEXT"
  47. continue-on-error: true
  48. - name: Dump runner context
  49. if: false
  50. env:
  51. RUNNER_CONTEXT: ${{ toJson(runner) }}
  52. run: echo "$RUNNER_CONTEXT"
  53. continue-on-error: true
  54. - uses: actions/checkout@v1
  55. with:
  56. submodules: true
  57. - name: Use Node.js 12.x
  58. uses: actions/setup-node@v1
  59. with:
  60. node-version: 12.x
  61. - name: Use Yarn
  62. run: npm install -g yarn
  63. - name: Setup
  64. working-directory: src
  65. run: yarn install
  66. - name: Lint
  67. working-directory: src
  68. run: yarn lint
  69. - name: Build
  70. working-directory: src
  71. run: yarn build
  72. - name: Release
  73. working-directory: src/scripts
  74. continue-on-error: true
  75. env:
  76. SECRET_KEY: ${{ secrets.SECRET_KEY }}
  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