kind: pipeline
type: docker
name: default

steps:
- name: build
  image: maven:3-amazoncorretto-8
  commands:
  - mvn install
- name: gitea_release
  image: plugins/gitea-release
  settings:
    api_key: 
      from_secret: gitea_token
    base_url: https://git.jeddunk.xyz
    files:
      - auto-cream-api-*.zip
    checksum:
      - md5
      - sha1
      - sha256
      - sha512
      - adler32
      - crc32
  when:
    event: 
     - tag
- name: discord_webhook
  image: appleboy/drone-discord
  settings:
    webhook_id: 
      from_secret: discord_webhook_id
    webhook_token: 
      from_secret: discord_webhook_token
    message: >
      {{#success build.status}}
        build {{build.number}} succeeded.
      {{else}}
        build {{build.number}} failed.
      {{/success}}