From e92df6ac7e4331d54ae9fb2f8a5a66ecbff65e30 Mon Sep 17 00:00:00 2001 From: Lukas Bachschwell Date: Mon, 21 Nov 2022 17:17:14 +0100 Subject: [PATCH 1/3] Allow event deployment --- plugin/impl.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin/impl.go b/plugin/impl.go index 63a4fad..a30bfc5 100644 --- a/plugin/impl.go +++ b/plugin/impl.go @@ -44,7 +44,7 @@ type Settings struct { func (p *Plugin) Validate() error { var err error - if p.pipeline.Build.Event != "tag" { + if p.pipeline.Build.Event != "tag" && p.pipeline.Build.Event != "deployment" { return fmt.Errorf("github release plugin is only available for tags") } From bbcf96a4220a17e95e35e3d8db9b74e36d63a15d Mon Sep 17 00:00:00 2001 From: Lukas Bachschwell Date: Mon, 21 Nov 2022 17:26:41 +0100 Subject: [PATCH 2/3] Update README.md --- README.md | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index 47092ae..80cead4 100644 --- a/README.md +++ b/README.md @@ -1,15 +1,6 @@ -# drone-github-release +# woodpecker-github-release -[![Build Status](http://cloud.drone.io/api/badges/woodpecker-ci/plugin-github-release/status.svg)](http://cloud.drone.io/woodpecker-ci/plugin-github-release) -[![Gitter chat](https://badges.gitter.im/drone/drone.png)](https://gitter.im/drone/drone) -[![Join the discussion at https://discourse.drone.io](https://img.shields.io/badge/discourse-forum-orange.svg)](https://discourse.drone.io) -[![Drone questions at https://stackoverflow.com](https://img.shields.io/badge/drone-stackoverflow-orange.svg)](https://stackoverflow.com/questions/tagged/drone.io) -[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fwoodpecker-ci%2Fplugin-github-release.svg?type=shield)](https://app.fossa.com/projects/git%2Bgithub.com%2Fwoodpecker-ci%2Fplugin-github-release?ref=badge_shield) -[![](https://images.microbadger.com/badges/image/plugins/github-release.svg)](https://microbadger.com/images/plugins/github-release "Get your own image badge on microbadger.com") -[![Go Doc](https://godoc.org/github.com/woodpecker-ci/plugin-github-release?status.svg)](http://godoc.org/github.com/woodpecker-ci/plugin-github-release) -[![Go Report](https://goreportcard.com/badge/github.com/woodpecker-ci/plugin-github-release)](https://goreportcard.com/report/github.com/woodpecker-ci/plugin-github-release) - -Drone plugin to publish files and artifacts to GitHub Release. For the usage information and a listing of the available options please take a look at [the docs](http://plugins.drone.io/woodpecker-ci/plugin-github-release/). +Woodpecker plugin to publish files and artifacts to GitHub Release. ## Build @@ -21,7 +12,7 @@ export GOARCH=amd64 export CGO_ENABLED=0 export GO111MODULE=on -go build -v -a -tags netgo -o release/linux/amd64/drone-github-release +go build -v -a -tags netgo -o release/linux/amd64/plugin-github-release ``` ## Docker @@ -32,7 +23,7 @@ Build the Docker image with the following command: docker build \ --label org.label-schema.build-date=$(date -u +"%Y-%m-%dT%H:%M:%SZ") \ --label org.label-schema.vcs-ref=$(git rev-parse --short HEAD) \ - --file docker/Dockerfile.linux.amd64 --tag plugins/github-release . + --file docker/Dockerfile.multiarch --tag plugins/github-release . ``` ## Usage @@ -48,4 +39,4 @@ docker run --rm \ -v $(pwd):$(pwd) \ -w $(pwd) \ plugins/github-release -``` \ No newline at end of file +``` From c768eb18798b471c40a2c454e74f79a0eb9ad023 Mon Sep 17 00:00:00 2001 From: Lukas Bachschwell Date: Mon, 21 Nov 2022 18:09:33 +0100 Subject: [PATCH 3/3] Allow deployment event --- plugin/impl.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin/impl.go b/plugin/impl.go index a30bfc5..8501f9e 100644 --- a/plugin/impl.go +++ b/plugin/impl.go @@ -44,7 +44,7 @@ type Settings struct { func (p *Plugin) Validate() error { var err error - if p.pipeline.Build.Event != "tag" && p.pipeline.Build.Event != "deployment" { + if p.pipeline.Build.Event != "tag" && p.pipeline.Build.Event != "deployment" { return fmt.Errorf("github release plugin is only available for tags") }