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.

.drone.yml 1.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. ---
  2. kind: pipeline
  3. type: docker
  4. name: default
  5. steps:
  6. - name: restore cache
  7. image: drillster/drone-volume-cache
  8. settings:
  9. restore: true
  10. mount:
  11. - ./node_modules
  12. volumes:
  13. - name: cache
  14. path: /cache
  15. - name: npm install
  16. image: node:12
  17. commands:
  18. - npm install
  19. - name: npm run build
  20. image: node:12
  21. commands:
  22. - npm run build
  23. - name: rebuild cache
  24. image: drillster/drone-volume-cache
  25. settings:
  26. rebuild: true
  27. mount:
  28. - ./node_modules
  29. volumes:
  30. - name: cache
  31. path: /cache
  32. - name: npm run test
  33. image: node:12
  34. commands:
  35. - npm run test
  36. - name: build docs
  37. image: node:12
  38. commands:
  39. - npm run docs
  40. when:
  41. event:
  42. - tag
  43. - name: deliver docs
  44. image: node:12
  45. commands:
  46. - echo ${DRONE_BUILD_CREATED}
  47. - export GIT_SSL_NO_VERIFY=1
  48. - git clone https://gitea.nitowa.xyz/docs/${DRONE_REPO_NAME}.git; cd ${DRONE_REPO_NAME} && rm -rf ./*; cp -r ../docs/* .; cp ../LICENSE.md .
  49. - sed -i '1,3d; $d' README.md && echo "### Version\n\n${DRONE_TAG}\n" >> ./README.md
  50. - sed -i -e 1,4d ./globals.md && cat ./globals.md >> ./README.md
  51. - git add --all; git -c user.email="${DRONE_COMMIT_AUTHOR_EMAIL}" -c user.name="${DRONE_COMMIT_AUTHOR}" commit --all --allow-empty --message "generated from tag ${DRONE_TAG}"
  52. - (git tag ${DRONE_TAG} && git push --force origin master ${DRONE_TAG}) || true
  53. environment:
  54. GIT_USER:
  55. from_secret: git_user
  56. GIT_PASSWORD:
  57. from_secret: git_password
  58. when:
  59. event:
  60. - tag
  61. - name: npm publish
  62. image: plugins/npm
  63. settings:
  64. username: nitowa
  65. password:
  66. from_secret: npm_password
  67. email: peter.millauer@gmail.com
  68. when:
  69. event:
  70. - tag
  71. volumes:
  72. - name: cache
  73. host:
  74. path: /tmp