Add a gitea-release step to the Drone pipeline that uploads everything in build/libs/*.jar to a Gitea Release named after the pushed tag, authenticating with a gitea_token secret. The step is guarded with when.event tag, and tag was added to the pipeline trigger so the build itself runs for tag events. Document the one-time token / secret setup and the tag workflow in the README.
34 lines
589 B
YAML
34 lines
589 B
YAML
kind: pipeline
|
|
type: docker
|
|
name: build
|
|
|
|
trigger:
|
|
event:
|
|
- push
|
|
- pull_request
|
|
- tag
|
|
|
|
steps:
|
|
- name: gradle-build
|
|
image: gradle:jdk25
|
|
environment:
|
|
GRADLE_USER_HOME: /drone/src/.gradle
|
|
commands:
|
|
- gradle --no-daemon clean build
|
|
- ls -la build/libs
|
|
|
|
- name: gitea-release
|
|
image: plugins/gitea-release
|
|
settings:
|
|
api_key:
|
|
from_secret: gitea_token
|
|
base_url: https://git.nevetime.ru
|
|
files:
|
|
- build/libs/*.jar
|
|
title: ${DRONE_TAG}
|
|
checksum:
|
|
- sha256
|
|
when:
|
|
event:
|
|
- tag
|