Skip to content

Commit f67c35d

Browse files
committed
Unified documentation and readme
1 parent fb94247 commit f67c35d

File tree

1 file changed

+34
-6
lines changed

1 file changed

+34
-6
lines changed

README.md

Lines changed: 34 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,43 @@
88
[![Go Doc](https://godoc.org/github.com/drone-plugins/drone-gitea-release?status.svg)](http://godoc.org/github.com/drone-plugins/drone-gitea-release)
99
[![Go Report](https://goreportcard.com/badge/github.com/drone-plugins/drone-gitea-release)](https://goreportcard.com/report/github.com/drone-plugins/drone-gitea-release)
1010

11-
Drone plugin to publish files and artifacts to Gitea Release.
12-
13-
**Note: This plugin requires Gitea 1.5 or newer.**
11+
Drone plugin to publish files and artifacts to Gitea release. For the usage information and a listing of the available options please take a look at [the docs](http://plugins.drone.io/drone-plugins/drone-gitea-release/).
1412

1513
## Build
1614

17-
Build the binary with the following commands:
15+
Build the binary with the following command:
16+
17+
```console
18+
export GOOS=linux
19+
export GOARCH=amd64
20+
export CGO_ENABLED=0
21+
export GO111MODULE=on
22+
23+
go build -v -a -tags netgo -o release/linux/amd64/drone-gitea-release
24+
```
25+
26+
## Docker
27+
28+
Build the Docker image with the following command:
1829

30+
```console
31+
docker build \
32+
--label org.label-schema.build-date=$(date -u +"%Y-%m-%dT%H:%M:%SZ") \
33+
--label org.label-schema.vcs-ref=$(git rev-parse --short HEAD) \
34+
--file docker/Dockerfile.linux.amd64 --tag plugins/gitea-release .
1935
```
20-
GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -a -tags netgo -o release/linux/amd64/drone-gitea-release
21-
docker build --rm -t plugins/gitea-release .
36+
37+
## Usage
38+
39+
```console
40+
docker run --rm \
41+
-e PLUGIN_BASE_URL=https://try.gitea.io \
42+
-e PLUGIN_API_KEY=your-api-key \
43+
-e PLUGIN_FILES=build/* \
44+
-e DRONE_REPO_OWNER=gitea \
45+
-e DRONE_REPO_NAME=test \
46+
-e DRONE_BUILD_EVENT=tag \
47+
-v $(pwd):$(pwd) \
48+
-w $(pwd) \
49+
plugins/gitea-release
2250
```

0 commit comments

Comments
 (0)