Add Woodpecker CI pipeline to build and release on tag
This commit is contained in:
@@ -0,0 +1,25 @@
|
|||||||
|
when:
|
||||||
|
- event: release
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: test
|
||||||
|
image: golang:latest
|
||||||
|
commands:
|
||||||
|
- go test ./...
|
||||||
|
|
||||||
|
- name: build
|
||||||
|
image: golang:latest
|
||||||
|
commands:
|
||||||
|
- VERSION=${CI_COMMIT_TAG}
|
||||||
|
- go build -ldflags="-s -w -X main.version=${VERSION}" -o node-lookup ./...
|
||||||
|
depends_on: [test]
|
||||||
|
|
||||||
|
- name: release
|
||||||
|
image: woodpeckerci/plugin-gitea-release
|
||||||
|
settings:
|
||||||
|
api_key:
|
||||||
|
from_secret: GITEA_TOKEN
|
||||||
|
base_url: https://git.unkin.net
|
||||||
|
files: node-lookup
|
||||||
|
title: ${CI_COMMIT_TAG}
|
||||||
|
depends_on: [build]
|
||||||
Reference in New Issue
Block a user