-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #113 from ezhil56x/ci
ci: release cross platform
- Loading branch information
Showing
2 changed files
with
58 additions
and
44 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
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,45 +1,63 @@ | ||
# This is an example .goreleaser.yml file with some sensible defaults. | ||
# Make sure to check the documentation at https://goreleaser.com | ||
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 ./... | ||
project_name: scratchdata | ||
|
||
dist: .builds | ||
env: | ||
- CGO_ENABLED=1 | ||
|
||
builds: | ||
- env: | ||
# linux amd64 | ||
- id: scratchdata-linux-amd64 | ||
binary: scratchdata | ||
main: ./ | ||
env: | ||
- CGO_ENABLED=1 | ||
- CC=x86_64-linux-gnu-gcc | ||
- CXX=x86_64-linux-gnu-g++ | ||
goos: | ||
- linux | ||
- windows | ||
goarch: | ||
- amd64 | ||
|
||
# darwin arm64 | ||
- id: scratchdata-darwin-arm64 | ||
binary: scratchdata | ||
main: ./ | ||
env: | ||
- CGO_ENABLED=1 | ||
- CC=oa64-clang | ||
- CXX=oa64-clang++ | ||
goos: | ||
- darwin | ||
goarch: | ||
- arm64 | ||
|
||
# darwin amd64 | ||
- id: scratchdata-darwin-amd64 | ||
binary: scratchdata | ||
main: ./ | ||
env: | ||
- CGO_ENABLED=1 | ||
- CC=oa64-clang | ||
- CXX=oa64-clang++ | ||
goos: | ||
- darwin | ||
goarch: | ||
- amd64 | ||
|
||
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 | ||
- id: scratchdata | ||
allow_different_binary_count: true | ||
builds: | ||
- scratchdata-linux-amd64 | ||
- scratchdata-darwin-arm64 | ||
- scratchdata-darwin-amd64 | ||
name_template: '{{ .ProjectName }}_{{ .Os }}_{{ .Arch }}' | ||
wrap_in_directory: true | ||
format: tar.gz | ||
|
||
checksum: | ||
name_template: 'checksums.txt' | ||
snapshot: | ||
name_template: "{{ incpatch .Version }}-next" | ||
name_template: '{{ incpatch .Version }}-next' | ||
changelog: | ||
sort: asc | ||
filters: | ||
exclude: | ||
- '^docs:' | ||
- '^test:' | ||
|
||
# The lines beneath this are called `modelines`. See `:help modeline` | ||
# Feel free to remove those if you don't want/use them. | ||
# yaml-language-server: $schema=https://goreleaser.com/static/schema.json | ||
# vim: set ts=2 sw=2 tw=0 fo=cnqoj |