A command line tool to interact with Gitea servers
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.

194 lines
3.3KB

  1. ---
  2. kind: pipeline
  3. name: default
  4. platform:
  5. os: linux
  6. arch: amd64
  7. workspace:
  8. base: /go
  9. path: src/code.gitea.io/tea
  10. steps:
  11. - name: build
  12. pull: always
  13. image: golang:1.12
  14. environment:
  15. GOPROXY: https://goproxy.cn
  16. commands:
  17. - make clean
  18. - make vet
  19. - make lint
  20. - make fmt-check
  21. - make misspell-check
  22. - make test-vendor
  23. - make build
  24. when:
  25. event:
  26. - push
  27. - tag
  28. - pull_request
  29. - name: unit-test
  30. pull: always
  31. image: golang:1.12
  32. commands:
  33. - make unit-test-coverage
  34. settings:
  35. group: test
  36. when:
  37. branch:
  38. - master
  39. event:
  40. - push
  41. - pull_request
  42. - name: release-test
  43. pull: always
  44. image: golang:1.12
  45. commands:
  46. - make test
  47. settings:
  48. group: test
  49. when:
  50. branch:
  51. - "release/*"
  52. event:
  53. - push
  54. - pull_request
  55. - name: tag-test
  56. pull: always
  57. image: golang:1.12
  58. commands:
  59. - make test
  60. settings:
  61. group: test
  62. when:
  63. event:
  64. - tag
  65. - name: static
  66. pull: always
  67. image: techknowlogick/xgo:latest
  68. commands:
  69. - export PATH=$PATH:$GOPATH/bin
  70. - make release
  71. when:
  72. event:
  73. - push
  74. - tag
  75. - name: gpg-sign
  76. pull: always
  77. image: plugins/gpgsign:1
  78. settings:
  79. detach_sign: true
  80. excludes:
  81. - "dist/release/*.sha256"
  82. files:
  83. - "dist/release/*"
  84. environment:
  85. GPGSIGN_KEY:
  86. from_secret: gpgsign_key
  87. GPGSIGN_PASSPHRASE:
  88. from_secret: gpgsign_passphrase
  89. when:
  90. event:
  91. - push
  92. - tag
  93. - name: tag-release
  94. pull: always
  95. image: plugins/s3:1
  96. settings:
  97. acl: public-read
  98. bucket: releases
  99. endpoint: https://storage.gitea.io
  100. path_style: true
  101. source: "dist/release/*"
  102. strip_prefix: dist/release/
  103. target: "/tea/${DRONE_TAG##v}"
  104. environment:
  105. AWS_ACCESS_KEY_ID:
  106. from_secret: aws_access_key_id
  107. AWS_SECRET_ACCESS_KEY:
  108. from_secret: aws_secret_access_key
  109. when:
  110. event:
  111. - tag
  112. - name: release-branch-release
  113. pull: always
  114. image: plugins/s3:1
  115. settings:
  116. acl: public-read
  117. bucket: releases
  118. endpoint: https://storage.gitea.io
  119. path_style: true
  120. source: "dist/release/*"
  121. strip_prefix: dist/release/
  122. target: "/tea/${DRONE_BRANCH##release/v}"
  123. environment:
  124. AWS_ACCESS_KEY_ID:
  125. from_secret: aws_access_key_id
  126. AWS_SECRET_ACCESS_KEY:
  127. from_secret: aws_secret_access_key
  128. when:
  129. branch:
  130. - "release/*"
  131. event:
  132. - push
  133. - name: release
  134. pull: always
  135. image: plugins/s3:1
  136. settings:
  137. acl: public-read
  138. bucket: releases
  139. endpoint: https://storage.gitea.io
  140. path_style: true
  141. source: "dist/release/*"
  142. strip_prefix: dist/release/
  143. target: /tea/master
  144. environment:
  145. AWS_ACCESS_KEY_ID:
  146. from_secret: aws_access_key_id
  147. AWS_SECRET_ACCESS_KEY:
  148. from_secret: aws_secret_access_key
  149. when:
  150. branch:
  151. - master
  152. event:
  153. - push
  154. - name: github
  155. pull: always
  156. image: plugins/gitea-releases:1
  157. settings:
  158. files:
  159. - "dist/release/*"
  160. environment:
  161. GITHUB_TOKEN:
  162. from_secret: github_token
  163. when:
  164. event:
  165. - tag
  166. - name: discord
  167. pull: always
  168. image: appleboy/drone-discord:1.0.0
  169. environment:
  170. DISCORD_WEBHOOK_ID:
  171. from_secret: discord_webhook_id
  172. DISCORD_WEBHOOK_TOKEN:
  173. from_secret: discord_webhook_token
  174. when:
  175. event:
  176. - push
  177. - tag
  178. - pull_request
  179. status:
  180. - changed
  181. - failure