chore(ci): add DroneCI
This commit is contained in:
parent
7c1c71ad55
commit
bcc4faae27
|
@ -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
|
6
justfile
6
justfile
|
@ -1,12 +1,10 @@
|
||||||
set shell := ["zsh", "-uc"]
|
set shell := ["zsh", "-uc"]
|
||||||
set dotenv-load
|
|
||||||
|
|
||||||
default:
|
default:
|
||||||
@just --list
|
@just --list
|
||||||
|
|
||||||
publish version:
|
publish version:
|
||||||
git-chglog --next-tag {{version}} --output CHANGELOG.md
|
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 tag -a {{version}} -m "{{version}}"
|
||||||
git push --follow-tags
|
git push --follow-tags
|
||||||
goreleaser release --rm-dist --release-notes <(git-chglog -t .chglog/RELEASE_CHANGELOG.tpl.md)
|
|
Reference in New Issue