build.yml 945 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. name: Build
  2. on:
  3. push:
  4. branches: [main]
  5. paths-ignore:
  6. - "**.md"
  7. - "**.spec.js"
  8. - ".idea"
  9. - ".vscode"
  10. - ".dockerignore"
  11. - "Dockerfile"
  12. - ".gitignore"
  13. - ".github/**"
  14. - "!.github/workflows/build.yml"
  15. jobs:
  16. build:
  17. runs-on: ${{ matrix.os }}
  18. strategy:
  19. matrix:
  20. os: [macos-latest, ubuntu-latest, windows-latest]
  21. steps:
  22. - name: Checkout Code
  23. uses: actions/checkout@v3
  24. - name: Setup Node.js
  25. uses: actions/setup-node@v3
  26. with:
  27. node-version: 18
  28. - name: Install Dependencies
  29. run: npm install
  30. - name: Build Release Files
  31. run: npm run build
  32. env:
  33. GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  34. - name: Upload Artifact
  35. uses: actions/upload-artifact@v3
  36. with:
  37. name: release_on_${{ matrix. os }}
  38. path: release/
  39. retention-days: 5