Skip to content

Commit

Permalink
feat: goreleaser configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
sebbalex committed Oct 6, 2020
1 parent 17f72d5 commit 20a6406
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 0 deletions.
48 changes: 48 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# This is an example goreleaser.yaml file with some sane defaults.
# Make sure to check the documentation at http://goreleaser.com
before:
hooks:
- go mod download
builds:
-
id: publiccode-validator
binary: publiccode-validator
main: ./src
ldflags:
- -s -w -X main.version={{.Version}} -X main.date={{.Date}}
env:
- CGO_ENABLED=0
# https://github.com/italia/publiccode-parser-go/issues/50
ignore:
- goos: darwin
goarch: 386
archives:
- replacements:
darwin: Darwin
linux: Linux
windows: Windows
386: i386
amd64: x86_64
checksum:
name_template: 'checksums.txt'
snapshot:
name_template: "{{ .Tag }}-next"
changelog:
sort: asc
filters:
exclude:
- '^docs:'
- '^test:'
dockers:
-
goos: linux
goarch: amd64
binaries:
- publiccode-validator
builds:
- publiccode-validator
skip_push: false
dockerfile: Dockerfile.goreleaser
image_templates:
- "italia/publiccode-validator:latest"
- "italia/publiccode-validator:{{ .Tag }}"
6 changes: 6 additions & 0 deletions Dockerfile.goreleaser
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
FROM alpine

COPY publiccode-validator /

# Run the compiled binary.
CMD ["/publiccode-validator"]

0 comments on commit 20a6406

Please sign in to comment.