-
-
Notifications
You must be signed in to change notification settings - Fork 341
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: migrate to new goreleaser config (#837)
- Loading branch information
Showing
2 changed files
with
27 additions
and
218 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
FROM alpine:3.15 | ||
|
||
RUN addgroup -S ory; \ | ||
adduser -S ory -G ory -D -H -s /bin/nologin | ||
RUN apk add -U --no-cache ca-certificates | ||
|
||
COPY keto /usr/bin/keto | ||
|
||
# set up nsswitch.conf for Go's "netgo" implementation | ||
# - https://github.com/golang/go/blob/go1.9.1/src/net/conf.go#L194-L275 | ||
RUN [ ! -e /etc/nsswitch.conf ] && echo 'hosts: files dns' > /etc/nsswitch.conf | ||
|
||
USER ory | ||
|
||
ENTRYPOINT ["keto"] | ||
CMD ["serve"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,220 +1,13 @@ | ||
# This is an example goreleaser.yaml file with some sane defaults. | ||
# Make sure to check the documentation at http://goreleaser.com | ||
project_name: keto | ||
|
||
env: | ||
- GOPROXY=https://proxy.golang.org,direct | ||
|
||
before: | ||
hooks: | ||
- go mod download | ||
- go mod tidy | ||
|
||
builds: | ||
- | ||
id: keto-sqlite-darwin | ||
flags: | ||
- -tags | ||
- sqlite | ||
ldflags: | ||
- -s -w -X github.com/ory/keto/internal/driver/config.Version={{.Tag}} -X github.com/ory/keto/internal/driver/config.Commit={{.FullCommit}} -X github.com/ory/keto/internal/driver/config.Date={{.Date}} | ||
# - "-extldflags '-static'" | ||
binary: keto | ||
env: | ||
- CGO_ENABLED=1 | ||
- CC=o64-clang | ||
- CXX=o64-clang++ | ||
goarch: | ||
- amd64 | ||
- arm64 | ||
goos: | ||
- darwin | ||
|
||
- | ||
id: keto-sqlite-linux | ||
flags: | ||
- -tags | ||
- sqlite | ||
ldflags: | ||
- -s -w -X github.com/ory/keto/internal/driver/config.Version={{.Tag}} -X github.com/ory/keto/internal/driver/config.Commit={{.FullCommit}} -X github.com/ory/keto/internal/driver/config.Date={{.Date}} | ||
binary: keto | ||
env: | ||
- CGO_ENABLED=1 | ||
goarch: | ||
- amd64 | ||
goos: | ||
- linux | ||
- | ||
id: keto-sqlite-linux-libmusl | ||
flags: | ||
- -tags | ||
- sqlite | ||
ldflags: | ||
- -s -w -X github.com/ory/keto/internal/driver/config.Version={{.Tag}} -X github.com/ory/keto/internal/driver/config.Commit={{.FullCommit}} -X github.com/ory/keto/internal/driver/config.Date={{.Date}} | ||
binary: keto | ||
env: | ||
- CGO_ENABLED=1 | ||
- CC=musl-gcc | ||
goarch: | ||
- amd64 | ||
goos: | ||
- linux | ||
- | ||
id: keto-sqlite-windows | ||
flags: | ||
- -tags | ||
- sqlite | ||
ldflags: | ||
- -s -w -X github.com/ory/keto/internal/driver/config.Version={{.Tag}} -X github.com/ory/keto/internal/driver/config.Commit={{.FullCommit}} -X github.com/ory/keto/internal/driver/config.Date={{.Date}} | ||
- "-extldflags '-static'" | ||
binary: keto | ||
env: | ||
- CGO_ENABLED=1 | ||
- CC=x86_64-w64-mingw32-gcc | ||
- CXX=x86_64-w64-mingw32-g++ | ||
goarch: | ||
- amd64 | ||
goos: | ||
- windows | ||
|
||
- | ||
id: keto | ||
ldflags: | ||
- -s -w -X github.com/ory/keto/internal/driver/config.Version={{.Tag}} -X github.com/ory/keto/internal/driver/config.Commit={{.FullCommit}} -X github.com/ory/keto/internal/driver/config.Date={{.Date}} | ||
binary: keto | ||
env: | ||
- CGO_ENABLED=0 | ||
goarch: | ||
- amd64 | ||
- arm | ||
- arm64 | ||
goarm: | ||
- 5 | ||
- 6 | ||
- 7 | ||
goos: | ||
- linux | ||
- windows | ||
- darwin | ||
|
||
archives: | ||
- id: keto-sqlite | ||
builds: | ||
- keto-sqlite-windows | ||
- keto-sqlite-darwin | ||
- keto-sqlite-linux | ||
replacements: | ||
darwin: macos | ||
386: 32bit | ||
amd64: 64bit | ||
arm: arm32 | ||
format_overrides: | ||
- | ||
goos: windows | ||
format: zip | ||
files: | ||
- CHANGELOG.md | ||
- LICENSE | ||
- README.md | ||
- SECURITY.md | ||
name_template: "{{ .ProjectName }}_{{ .Version }}-sqlite_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}" | ||
|
||
- id: keto-sqlite-libmusl | ||
builds: | ||
- keto-sqlite-linux-libmusl | ||
replacements: | ||
darwin: macos | ||
386: 32bit | ||
amd64: 64bit | ||
arm: arm32 | ||
format_overrides: | ||
- | ||
goos: windows | ||
format: zip | ||
files: | ||
- CHANGELOG.md | ||
- LICENSE | ||
- README.md | ||
- SECURITY.md | ||
name_template: "{{ .ProjectName }}_{{ .Version }}-sqlite-libmusl_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}" | ||
|
||
- id: keto | ||
builds: | ||
- keto | ||
replacements: | ||
darwin: macos | ||
386: 32bit | ||
amd64: 64bit | ||
arm: arm32 | ||
format_overrides: | ||
- goos: windows | ||
format: zip | ||
files: | ||
- CHANGELOG.md | ||
- LICENSE | ||
- README.md | ||
- SECURITY.md | ||
|
||
snapshot: | ||
name_template: "{{ .Tag }}-next" | ||
|
||
changelog: | ||
sort: asc | ||
filters: | ||
exclude: | ||
- ci skip | ||
- Merge pull request | ||
- Merge branch | ||
|
||
brews: | ||
- tap: | ||
owner: ory | ||
name: homebrew-keto | ||
ids: | ||
- keto-sqlite | ||
homepage: https://www.ory.sh | ||
commit_author: | ||
name: aeneasr | ||
email: 3372410+aeneasr@users.noreply.github.com | ||
install: | | ||
bin.install "keto" | ||
scoop: | ||
bucket: | ||
owner: ory | ||
name: scoop-keto | ||
homepage: https://www.ory.sh | ||
commit_author: | ||
name: aeneasr | ||
email: 3372410+aeneasr@users.noreply.github.com | ||
|
||
checksum: | ||
algorithm: sha256 | ||
|
||
dockers: | ||
- dockerfile: .docker/Dockerfile-sqlite | ||
ids: | ||
- keto-sqlite-linux-libmusl | ||
image_templates: | ||
- "oryd/keto:v{{ .Major }}-sqlite" | ||
- "oryd/keto:v{{ .Major }}.{{ .Minor }}-sqlite" | ||
- "oryd/keto:v{{ .Major }}.{{ .Minor }}.{{ .Patch }}-sqlite" | ||
- "oryd/keto:{{.Tag}}-sqlite" | ||
- "oryd/keto:latest-sqlite" | ||
- dockerfile: .docker/Dockerfile | ||
ids: | ||
- keto | ||
image_templates: | ||
- "oryd/keto:v{{ .Major }}" | ||
- "oryd/keto:v{{ .Major }}.{{ .Minor }}" | ||
- "oryd/keto:v{{ .Major }}.{{ .Minor }}.{{ .Patch }}" | ||
- "oryd/keto:{{.Tag}}" | ||
- "oryd/keto:latest" | ||
|
||
release: | ||
prerelease: auto | ||
name_template: "{{.Tag}}" | ||
ids: | ||
- keto-sqlite | ||
- keto-sqlite-libmusl | ||
- keto | ||
includes: | ||
- from_url: | ||
url: https://raw.githubusercontent.com/ory/xgoreleaser/master/build.tmpl.yml | ||
|
||
variables: | ||
brew_name: keto | ||
brew_description: "The Ory Authorization Server (Ory Keto)" | ||
buildinfo_hash: "github.com/ory/keto/internal/driver/config.Commit" | ||
buildinfo_tag: "github.com/ory/keto/internal/driver/config.Version" | ||
buildinfo_date: "github.com/ory/keto/internal/driver/config.Date" | ||
dockerfile: ".docker/Dockerfile-alpine" |