ci: add tag-based release pipeline with coverage and source archive

This commit is contained in:
Stefan Goppelt 2026-03-29 16:04:02 +02:00
parent 2e267ac6dd
commit 91c2a313f2
1 changed files with 26 additions and 1 deletions

View File

@ -2,6 +2,11 @@ kind: pipeline
type: docker type: docker
name: go-lib/util name: go-lib/util
trigger:
event: tag
ref:
- refs/tags/v*
steps: steps:
- name: test - name: test
image: golang:1.25.8 image: golang:1.25.8
@ -14,3 +19,23 @@ steps:
- bash scripts/check-coverage.sh .build/coverage.out 80 - bash scripts/check-coverage.sh .build/coverage.out 80
- go install golang.org/x/vuln/cmd/govulncheck@latest - go install golang.org/x/vuln/cmd/govulncheck@latest
- govulncheck -json ./... > vulncheck.json - govulncheck -json ./... > vulncheck.json
- name: package
image: golang:1.25.8
commands:
- tar czf .build/sources.tar.gz --exclude=.build --exclude=.git --exclude=.drone.yml .
when:
status: success
- name: release
image: plugins/gitea-release
settings:
api_key:
from_secret: gitea_token
files:
- .build/coverage.txt
- .build/sources.tar.gz
title: ${DRONE_TAG}
note: "Release ${DRONE_TAG}\n\nCoverage report: coverage.txt"
when:
status: success