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.

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. # This workflow is provided via the organization template repository
  2. #
  3. # https://github.com/nextcloud/.github
  4. # https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization
  5. name: Node
  6. on:
  7. pull_request:
  8. push:
  9. branches:
  10. - main
  11. - master
  12. - stable*
  13. jobs:
  14. build:
  15. runs-on: ubuntu-latest
  16. name: node
  17. steps:
  18. - name: Checkout
  19. uses: actions/checkout@v3
  20. - name: Read package.json node and npm engines version
  21. uses: skjnldsv/read-package-engines-version-actions@v1.2
  22. id: versions
  23. with:
  24. fallbackNode: '^12'
  25. fallbackNpm: '^6'
  26. - name: Set up node ${{ steps.versions.outputs.nodeVersion }}
  27. uses: actions/setup-node@v3
  28. with:
  29. node-version: ${{ steps.versions.outputs.nodeVersion }}
  30. - name: Set up npm ${{ steps.versions.outputs.npmVersion }}
  31. run: npm i -g npm@"${{ steps.versions.outputs.npmVersion }}"
  32. - name: Install dependencies & build
  33. run: |
  34. npm ci
  35. npm run build --if-present
  36. - name: Build css
  37. run: npm run sass
  38. - name: Build icons css
  39. run: npm run sass:icons
  40. - name: Check webpack build changes
  41. run: |
  42. bash -c "[[ ! \"`git status --porcelain `\" ]] || exit 1"
  43. - name: Show changes on failure
  44. if: failure()
  45. run: |
  46. git status
  47. git --no-pager diff