implement goreleaser
This commit is contained in:
parent
e8a4c6fa34
commit
74df46e0ee
4 changed files with 43 additions and 2 deletions
28
.goreleaser.yml
Normal file
28
.goreleaser.yml
Normal file
|
@ -0,0 +1,28 @@
|
|||
# This is an example goreleaser.yaml file with some sane defaults.
|
||||
# Make sure to check the documentation at http://goreleaser.com
|
||||
builds:
|
||||
- env:
|
||||
- CGO_ENABLED=0
|
||||
goos:
|
||||
- linux
|
||||
goarch:
|
||||
- amd64
|
||||
ldflags:
|
||||
- -X "{{ .Env.IMPORTPATH }}/meta.semVersion={{ .Tag }}" -X "{{ .Env.IMPORTPATH }}/meta.version={{ .Env.VERSIONSHORT }}" -X "{{ .Env.IMPORTPATH }}/meta.versionLong={{ .Env.VERSIONLONG }}" -X "{{ .Env.IMPORTPATH }}/meta.commitMsg={{ .Env.COMMITMSG }}"
|
||||
archive:
|
||||
name_template: '{{ .ProjectName }}_{{ .Os }}_{{ .Arch }}'
|
||||
replacements:
|
||||
linux: Linux
|
||||
amd64: x86_64
|
||||
format: zip
|
||||
checksum:
|
||||
name_template: 'checksums.txt'
|
||||
snapshot:
|
||||
name_template: "{{ .Tag }}-next"
|
||||
changelog:
|
||||
sort: asc
|
||||
filters:
|
||||
exclude:
|
||||
- '^docs:'
|
||||
- '^test:'
|
||||
|
|
@ -8,11 +8,12 @@ go:
|
|||
env:
|
||||
- GO111MODULE=on
|
||||
deploy:
|
||||
provider: releases
|
||||
provider: script
|
||||
skip_cleanup: true
|
||||
script: ./scripts/deploy.sh
|
||||
api_key:
|
||||
secure: 8WrFVcu/Nf6/BjxSXS6cewnm+2KWbJ2hz8A8FQ1VrsUDP+R0R1QYfO7QtbfSsoCuvtWNy5Tvk/zpjRH8ZvAVR16kE++rX0NYqXNzf19l0kgZQQQjQxulGRBPCa/BdqO99NcSFyyG63dpMOL9amcvH0FPGMGO2V3QsneB3EgtsK4EZAAFDO0B9GqWrB/cMlhzHyPiUN258BRg9jjka8Dnsxcprmk9RMn0Eoc7Doavt4JGbkBRo2rEfNUpKHofELOu5YZfuZZsKgyZ0yX+tGZhafqyqHyEZLruKp42DtzSlkBwzDq1Yix84WOgvPABBiX15K4vqPUpz0PnPktfqLmzvDSs3pT3Lu5IB47mnTzydlD4lRn31Id+1vb7vaIgbXeujt7cFAeQ/Oy6X2wMv9PQgS6WrP/l3b8RzJBdDCB5kG9QwOI6V5C35nQlp5C0R5Z5wR61WTjeaU0Ck9xzXOsXnKjKZdTyrPfw/x96KjuIwt/rjYc3RLduR0YrngS7sOabb9WbErNLjI32w/LEK9A39yAwXl9KKxp4I+1QYLzqzVkN/TzHtrpmb04EJFhgb7wAcRu3n5T0jyTUFskFbOMQ+CypekIB2t8vAhozy56jH116l60zsG3Je7B+Caug0Idn+0B8w1OKqVnjtic+dg6NzHsUIp+0ADBT9OAQDjLkymM=
|
||||
file: bin/ytsync
|
||||
on:
|
||||
repo: lbryio/ytsync
|
||||
tags: true
|
||||
skip_cleanup: true
|
7
scripts/deploy.sh
Executable file
7
scripts/deploy.sh
Executable file
|
@ -0,0 +1,7 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
export IMPORTPATH="github.com/lbryio/ytsync"
|
||||
export VERSIONSHORT="${TRAVIS_COMMIT:-"$(git describe --tags --always --dirty)"}"
|
||||
export VERSIONLONG="${TRAVIS_COMMIT:-"$(git describe --tags --always --dirty --long)"}"
|
||||
export COMMITMSG="$(echo ${TRAVIS_COMMIT_MESSAGE:-"$(git show -s --format=%s)"} | tr -d '"' | head -n 1)"
|
||||
curl -sL https://git.io/goreleaser | bash
|
5
scripts/release.sh
Executable file
5
scripts/release.sh
Executable file
|
@ -0,0 +1,5 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
go get github.com/caarlos0/svu
|
||||
git tag `svu "$1"`
|
||||
git push --tags
|
Loading…
Reference in a new issue