ci.yml 841 B

12345678910111213141516171819202122232425262728293031
  1. name: CI
  2. on: [push]
  3. jobs:
  4. build:
  5. runs-on: ubuntu-latest
  6. steps:
  7. - name: Checkout repo
  8. uses: actions/checkout@v2
  9. - name: Set up Node.Js
  10. uses: actions/setup-node@v1
  11. with:
  12. node-version: 12
  13. - name: Lint source code
  14. env:
  15. CI: true
  16. run: |
  17. npm ci
  18. ./node_modules/.bin/eslint **/*.js --fix
  19. npm ci --only=production
  20. - name: Generate manifest
  21. run: npm run manifest
  22. - name: Commit changes
  23. run: |
  24. [[ `git status --porcelain` ]] || exit
  25. git config --global core.autocrlf false
  26. git config --global user.name 'SaltyMonkey'
  27. git config --global user.email 'SaltyMonkey@users.noreply.github.com'
  28. git commit -am "[CI] Automatic commit and lint"
  29. git push