From ce8065cbbc4a23749e6d6fc15fbc630740f725b3 Mon Sep 17 00:00:00 2001 From: = Date: Wed, 5 Jan 2022 01:40:59 +0100 Subject: [PATCH] Use multi-pipeline for CI --- .woodpecker.yml => .woodpecker/push.yml | 22 ++++++++-------------- .woodpecker/test.yml | 15 +++++++++++++++ ezshare/version.go | 2 +- 3 files changed, 24 insertions(+), 15 deletions(-) rename .woodpecker.yml => .woodpecker/push.yml (58%) create mode 100644 .woodpecker/test.yml diff --git a/.woodpecker.yml b/.woodpecker/push.yml similarity index 58% rename from .woodpecker.yml rename to .woodpecker/push.yml index 08e94d6..8df4de0 100644 --- a/.woodpecker.yml +++ b/.woodpecker/push.yml @@ -1,13 +1,4 @@ pipeline: - build: - image: golang:${GO_VERSION} - commands: - - go build main.go - - go test -v ./... - when: - branch: master - event: [push, pull_request, tag, deployment] - tag: image: alpine:latest commands: @@ -15,6 +6,8 @@ pipeline: - cat .tags when: status: [success] + branch: refs/tags/* + tag: v* publish: image: plugins/docker @@ -22,11 +15,12 @@ pipeline: repo: registry.t-juice.club/ezshare username: woodpecker password: - from_secret: registrypassword + from_secret: registrypass when: + branch: refs/tags/* tag: v* -matrix: - GO_VERSION: - - "1.17" - - "latest" +depends_on: + - "test" + +run_on: [success] \ No newline at end of file diff --git a/.woodpecker/test.yml b/.woodpecker/test.yml new file mode 100644 index 0000000..0adc81a --- /dev/null +++ b/.woodpecker/test.yml @@ -0,0 +1,15 @@ +pipeline: + test: + image: golang:${GO_VERSION} + commands: + - go build main.go + - go test -v ./... + - go vet ./... + when: + branch: master + event: [push, pull_request, tag, deployment] + +matrix: + GO_VERSION: + - "1.17" + - "latest" diff --git a/ezshare/version.go b/ezshare/version.go index 591e413..bbf774a 100644 --- a/ezshare/version.go +++ b/ezshare/version.go @@ -1,4 +1,4 @@ package ezshare // TODO: Maybe put this somewhere more sensible -const Version = "v0.1.2" +const Version = "v0.1.3"