feat: auto-release abra with goreleaser when a tag is pushed
continuous-integration/drone/push Build is passing Details

This commit is contained in:
knoflook 2021-09-06 14:10:08 +02:00
parent 8aaedee39e
commit bb8124030e
Signed by: knoflook
GPG Key ID: D6A1D0E8FC4FEF1C
3 changed files with 67 additions and 4 deletions

View File

@ -42,6 +42,31 @@ steps:
when:
status:
- failure
trigger:
branch:
- main
- name: fetch
image: docker:git
commands:
- git fetch --tags
depends_on:
- make check
- make build
- make test
- name: release
image: golang:1.16
environment:
GITEA_TOKEN:
from_secret: gitea_token
volumes:
- name: deps
path: /go
commands:
- curl -sL https://git.io/goreleaser | bash
depends_on:
- fetch
when:
event: tag
volumes:
- name: deps
temp: {}

3
.gitignore vendored
View File

@ -1,4 +1,5 @@
abra
.vscode/
vendor/
.envrc
.envrc
dist/

37
.goreleaser.yml Normal file
View File

@ -0,0 +1,37 @@
# This is an example .goreleaser.yml file with some sane defaults.
# Make sure to check the documentation at http://goreleaser.com
gitea_urls:
api: https://git.coopcloud.tech/api/v1
download: https://git.coopcloud.tech/
skip_tls_verify: false
before:
hooks:
# You may remove this if you don't use go modules.
- go mod tidy
# you may remove this if you don't need go generate
- go generate ./...
builds:
- env:
- CGO_ENABLED=0
dir: cmd/abra
goos:
- linux
# - windows
# - darwin
archives:
- replacements:
linux: Linux
# darwin: Darwin
# windows: Windows
386: i386
amd64: x86_64
checksum:
name_template: 'checksums.txt'
snapshot:
name_template: "{{ incpatch .Version }}-next"
changelog:
sort: asc
filters:
exclude:
- '^docs:'
- '^test:'