diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000..96b187b --- /dev/null +++ b/.drone.yml @@ -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 \ No newline at end of file diff --git a/justfile b/justfile index f1656bf..57988d2 100644 --- a/justfile +++ b/justfile @@ -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) \ No newline at end of file + git push --follow-tags \ No newline at end of file