Skip to content

Commit

Permalink
feat: setup release
Browse files Browse the repository at this point in the history
  • Loading branch information
rruizt committed Apr 8, 2024
1 parent c084c83 commit f3d5459
Show file tree
Hide file tree
Showing 5 changed files with 92 additions and 5 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@

dist/
79 changes: 79 additions & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
# This is an example .goreleaser.yml file with some sensible defaults.
# Make sure to check the documentation at https://goreleaser.com

# The lines below are called `modelines`. See `:help modeline`
# Feel free to remove those if you don't want/need to use them.
# yaml-language-server: $schema=https://goreleaser.com/static/schema.json
# vim: set ts=2 sw=2 tw=0 fo=cnqoj

version: 1

before:
hooks:
# You may remove this if you don't use go modules.
- go mod tidy

builds:
- main: ./cmd/omnivore-as-rss/omnivore-as-rss.go
env:
- CGO_ENABLED=0
binary: omnivore-to-rss
goos:
- linux
- windows
- darwin
goarch:
- arm
- amd64
goarm:
- 7

dockers:
- image_templates:
- "rruizt/omnivore-to-rss:{{ .Version }}-amd64"
use: buildx
dockerfile: build/Dockerfile
build_flag_templates:
- "--platform=linux/amd64"

- image_templates:
- "rruizt/omnivore-to-rss:{{ .Version }}-armv7"
use: buildx
goarch: arm
goarm: 7
dockerfile: build/Dockerfile
build_flag_templates:
- "--platform=linux/arm/v7"

docker_manifests:
- name_template: "rruizt/omnivore-to-rss:{{ .Version }}"
image_templates:
- "rruizt/omnivore-to-rss:{{ .Version }}-amd64"
- "rruizt/omnivore-to-rss:{{ .Version }}-armv7"
- name_template: "rruizt/omnivore-to-rss:latest"
image_templates:
- "rruizt/omnivore-to-rss:{{ .Version }}-amd64"
- "rruizt/omnivore-to-rss:{{ .Version }}-armv7"


archives:
- format: tar.gz
# this name template makes the OS and Arch compatible with the results of `uname`.
name_template: >-
{{ .ProjectName }}_
{{- title .Os }}_
{{- if eq .Arch "amd64" }}x86_64
{{- else if eq .Arch "386" }}i386
{{- else }}{{ .Arch }}{{ end }}
{{- if .Arm }}v{{ .Arm }}{{ end }}
# use zip for windows archives
format_overrides:
- goos: windows
format: zip

changelog:
sort: asc
filters:
exclude:
- "^docs:"
- "^test:"
3 changes: 3 additions & 0 deletions build/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
FROM alpine
ENTRYPOINT [ "usr/bin/omnivore-to-rss" ]
COPY omnivore-to-rss /usr/bin/omnivore-to-rss
8 changes: 5 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@ module omnivore-as-rss

go 1.19

require (
github.com/gorilla/feeds v1.1.2
github.com/hasura/go-graphql-client v0.12.1
)

require (
github.com/google/uuid v1.6.0 // indirect
github.com/gorilla/feeds v1.1.2 // indirect
github.com/hasura/go-graphql-client v0.12.1 // indirect
golang.org/x/text v0.14.0 // indirect
nhooyr.io/websocket v1.8.10 // indirect
)
5 changes: 3 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ github.com/gorilla/feeds v1.1.2 h1:pxzZ5PD3RJdhFH2FsJJ4x6PqMqbgFk1+Vez4XWBW8Iw=
github.com/gorilla/feeds v1.1.2/go.mod h1:WMib8uJP3BbY+X8Szd1rA5Pzhdfh+HCCAYT2z7Fza6Y=
github.com/hasura/go-graphql-client v0.12.1 h1:tL+BCoyubkYYyaQ+tJz+oPe/pSxYwOJHwe5SSqqi6WI=
github.com/hasura/go-graphql-client v0.12.1/go.mod h1:F4N4kR6vY8amio3gEu3tjSZr8GPOXJr3zj72DKixfLE=
golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ=
golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
github.com/rogpeppe/go-internal v1.9.0 h1:73kH8U+JUqXU8lRuOHeVHaa/SZPifC7BkcraZVejAe8=
nhooyr.io/websocket v1.8.10 h1:mv4p+MnGrLDcPlBoWsvPP7XCzTYMXP9F9eIGoKbgx7Q=
nhooyr.io/websocket v1.8.10/go.mod h1:rN9OFWIUwuxg4fR5tELlYC04bXYowCP9GX47ivo2l+c=

0 comments on commit f3d5459

Please sign in to comment.