From 4c9bd43c7d67c40d39cdf67e83c3957e59c41b65 Mon Sep 17 00:00:00 2001 From: garrettmills Date: Tue, 9 Feb 2021 10:57:58 -0600 Subject: [PATCH] Add release and notification steps to CI --- .drone.yml | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/.drone.yml b/.drone.yml index df9d271..0939d74 100644 --- a/.drone.yml +++ b/.drone.yml @@ -7,3 +7,47 @@ steps: commands: - ./prep_workspace.bash - ./gradlew build shadowJar reobfShadowJar + - ls ./build/libs + + - name: release + image: plugins/gitea-release + settings: + api_key: + from_secret: gitea_api_key + base_url: https://code.garrettmills.dev + files: + - ./build/libs/matterlinkreboot-${DRONE_TAG}-all.jar + - ./build/libs/matterlinkreboot-${DRONE_TAG}.jar + title: ${DRONE_TAG} + when: + event: tag + + - name: send build success notifications + image: plugins/webhook + settings: + urls: + from_secret: notify_webhook_url + content_type: application/json + template: | + { + "title": "Drone-CI [matterlink-reboot @ ${DRONE_BUILD_NUMBER}]", + "message": "Build completed successfully. (Changes by ${DRONE_COMMIT_AUTHOR})", + "priority": 4 + } + when: + status: success + + - name: send build error notifications + image: plugins/webhook + settings: + urls: + from_secret: notify_webhook_url + content_type: application/json + template: | + { + "title": "Drone-CI [matterlink-reboot @ ${DRONE_BUILD_NUMBER}]", + "message": "Build failed! (Changes by ${DRONE_COMMIT_AUTHOR})", + "priority": 6 + } + when: + status: failure \ No newline at end of file