chore(ci): add DroneCI

This commit is contained in:
DataHearth 2023-02-10 17:45:02 +01:00
parent 7c1c71ad55
commit bcc4faae27
No known key found for this signature in database
GPG Key ID: E88FD356ACC5F3C4
2 changed files with 31 additions and 4 deletions

29
.drone.yml Normal file
View File

@ -0,0 +1,29 @@
name: default
kind: pipeline
type: docker
steps:
- name: fetch tags
image: alpine/git
commands:
- git fetch --tags
when:
event:
- tag
- name: build
image: golang:1.17-alpine
commands:
- go build -v ./...
- name: release
image: goreleaser/goreleaser
environment:
GITHUB_TOKEN:
from_secret: github_token
commands:
- go install github.com/git-chglog/git-chglog/cmd/git-chglog@latest
- goreleaser release --clean --release-notes <(git-chglog -t .chglog/RELEASE_CHANGELOG.tpl.md)
when:
event:
- tag

View File

@ -1,12 +1,10 @@
set shell := ["zsh", "-uc"]
set dotenv-load
default:
@just --list
publish version:
git-chglog --next-tag {{version}} --output CHANGELOG.md
git add CHANGELOG.md && git commit -m "chore: update CHANGELOG {{version}}"
git add CHANGELOG.md && git commit -m "chore(changelog): release {{version}}"
git tag -a {{version}} -m "{{version}}"
git push --follow-tags
goreleaser release --rm-dist --release-notes <(git-chglog -t .chglog/RELEASE_CHANGELOG.tpl.md)
git push --follow-tags