Merge pull request 'Use multi-pipeline for CI' (#31) from feature/multi-pipeline into master

Reviewed-on: https://gitea.benny.dog/torjus/ezshare/pulls/31
This commit is contained in:
Torjus Håkestad 2022-01-05 00:48:59 +00:00
commit f27fe0ebfa
3 changed files with 24 additions and 15 deletions

View File

@ -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]

15
.woodpecker/test.yml Normal file
View File

@ -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"

View File

@ -1,4 +1,4 @@
package ezshare
// TODO: Maybe put this somewhere more sensible
const Version = "v0.1.2"
const Version = "v0.1.3"