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.

77 lines
1.8 KiB

  1. kind: pipeline
  2. name: default
  3. steps:
  4. - name: unit tests
  5. image: node:12
  6. commands:
  7. - yarn install
  8. - yarn run test_units
  9. - name: integration tests
  10. image: node:12
  11. commands:
  12. - yarn install
  13. - yarn run test_integration
  14. - name: release
  15. image: plugins/gitea-release
  16. settings:
  17. api_key:
  18. from_secret: gitea_api_key
  19. base_url: https://git.garrettmills.dev
  20. title: ${DRONE_TAG}
  21. when:
  22. event: tag
  23. - name: npm publish
  24. image: plugins/npm
  25. settings:
  26. username:
  27. from_secret: npm_username
  28. password:
  29. from_secret: npm_password
  30. email:
  31. from_secret: npm_email
  32. when:
  33. event: tag
  34. - name: send success notifications
  35. image: plugins/webhook
  36. settings:
  37. urls:
  38. from_secret: notify_webhook_url
  39. content_type: application/json
  40. template: |
  41. {
  42. "title": "Drone-CI [flitter-di]",
  43. "message": "Published release flitter-di@${DRONE_TAG} successfully.",
  44. "priority": 4
  45. }
  46. when:
  47. status: success
  48. event: tag
  49. - name: send error notifications
  50. image: plugins/webhook
  51. settings:
  52. urls:
  53. from_secret: notify_webhook_url
  54. content_type: application/json
  55. template: |
  56. {
  57. "title": "Drone-CI [flitter-di]",
  58. "message": "An error was encountered while releasing flitter-di@${DRONE_TAG}.",
  59. "priority": 6
  60. }
  61. when:
  62. status: failure
  63. event: tag
  64. - name: promote Flitter docs
  65. image: plugins/downstream
  66. settings:
  67. server: https://ci.garrettmills.dev
  68. token:
  69. from_secret: drone_token
  70. fork: false
  71. last_successful: true
  72. deploy: production
  73. repositories:
  74. - flitter/docs@master
  75. when:
  76. status: success
  77. event: tag