diff --git a/.drone.yml b/.drone.yml index 5a9546ae..dd1e5245 100644 --- a/.drone.yml +++ b/.drone.yml @@ -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: {} diff --git a/.gitignore b/.gitignore index 40088595..e91f1695 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ abra .vscode/ vendor/ -.envrc \ No newline at end of file +.envrc +dist/ diff --git a/.goreleaser.yml b/.goreleaser.yml new file mode 100644 index 00000000..7ee25216 --- /dev/null +++ b/.goreleaser.yml @@ -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:'