
drone-gitlab-release


Drone plugin for creating a GitLab release.
Build
Build the binary with the following commands:
go build
Docker
Build the Docker image with the following commands:
GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -a -tags netgo -o release/linux/amd64/drone-gitlab-releases
docker build --rm -t plugins/gitlab-releases .
Usage
Execute from the working directory:
docker run --rm \
-e PLUGIN_ASSETS=example.zip \
-e PLUGIN_NAME="Release Name" \
-e PLUGIN_TOKEN=gitLabToken \
-e DRONE_BUILD_EVENT=tag \
-e DRONE_REMOTE_URL=https://gitlab.com/octocat/hello-world.git \
-e DRONE_REPO=octocat/hello-world \
-e DRONE_TAG=0.0.1 \
-e DRONE_COMMIT_MESSAGE="template and release link assets" \
-e PLUGIN_RELEASE_TEMPLATE = "## Release Notes\n*Commit message*: {{.Commit.Message}}" \
plugins/gitlab-releases
PLUGIN_RELEASE_TEMPLATE env var are optional. Default value is ## Release notes\n> Commit message: {{.Commit.Message}}