mirror of
https://gitea.com/gitea/tea
synced 2024-11-23 00:12:05 +01:00
cd6a7b35c3
- Add `dir: ./dist/` to the builds section in `.goreleaser.yaml` ref: https://gitea.com/gitea/act_runner/issues/158 Signed-off-by: appleboy <appleboy.tw@gmail.com> Reviewed-on: https://gitea.com/gitea/tea/pulls/547 Reviewed-by: Jason Song <i@wolfogre.com> Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: appleboy <appleboy.tw@gmail.com> Co-committed-by: appleboy <appleboy.tw@gmail.com>
124 lines
2.4 KiB
YAML
124 lines
2.4 KiB
YAML
before:
|
|
hooks:
|
|
- go mod tidy
|
|
|
|
builds:
|
|
- env:
|
|
- CGO_ENABLED=0
|
|
goos:
|
|
- darwin
|
|
- linux
|
|
- windows
|
|
- freebsd
|
|
goarch:
|
|
- amd64
|
|
- arm
|
|
- arm64
|
|
goarm:
|
|
- "5"
|
|
- "6"
|
|
- "7"
|
|
ignore:
|
|
- goos: darwin
|
|
goarch: arm
|
|
- goos: darwin
|
|
goarch: ppc64le
|
|
- goos: darwin
|
|
goarch: s390x
|
|
- goos: windows
|
|
goarch: ppc64le
|
|
- goos: windows
|
|
goarch: s390x
|
|
- goos: windows
|
|
goarch: arm
|
|
goarm: "5"
|
|
- goos: windows
|
|
goarch: arm
|
|
goarm: "6"
|
|
- goos: windows
|
|
goarch: arm
|
|
goarm: "7"
|
|
- goos: windows
|
|
goarch: arm64
|
|
- goos: freebsd
|
|
goarch: ppc64le
|
|
- goos: freebsd
|
|
goarch: s390x
|
|
- goos: freebsd
|
|
goarch: arm
|
|
goarm: "5"
|
|
- goos: freebsd
|
|
goarch: arm
|
|
goarm: "6"
|
|
- goos: freebsd
|
|
goarch: arm
|
|
goarm: "7"
|
|
- goos: freebsd
|
|
goarch: arm64
|
|
flags:
|
|
- -trimpath
|
|
ldflags:
|
|
- -s -w -X main.Version={{ .Version }}
|
|
binary: >-
|
|
{{ .ProjectName }}-
|
|
{{- .Version }}-
|
|
{{- .Os }}-
|
|
{{- if eq .Arch "amd64" }}amd64
|
|
{{- else if eq .Arch "amd64_v1" }}amd64
|
|
{{- else if eq .Arch "386" }}386
|
|
{{- else }}{{ .Arch }}{{ end }}
|
|
{{- if .Arm }}-{{ .Arm }}{{ end }}
|
|
no_unique_dist_dir: true
|
|
hooks:
|
|
post:
|
|
- cmd: tar -cJf {{ .Path }}.xz {{ .Path }}
|
|
dir: ./dist/
|
|
env:
|
|
- XZ_OPT=-9
|
|
- cmd: sh .goreleaser.checksum.sh {{ .Path }}
|
|
- cmd: sh .goreleaser.checksum.sh {{ .Path }}.xz
|
|
|
|
blobs:
|
|
-
|
|
provider: s3
|
|
bucket: "{{ .Env.S3_BUCKET }}"
|
|
region: "{{ .Env.S3_REGION }}"
|
|
folder: "tea/{{.Version}}"
|
|
extra_files:
|
|
- glob: ./**.xz
|
|
- glob: ./**.sha256
|
|
|
|
archives:
|
|
- format: binary
|
|
name_template: "{{ .Binary }}"
|
|
allow_different_binary_count: true
|
|
|
|
checksum:
|
|
name_template: 'checksums.txt'
|
|
extra_files:
|
|
- glob: ./**.xz
|
|
|
|
env_files:
|
|
# override gitea actions which passes GITHUB_TOKEN to set env var as null
|
|
github_token: /dev/null
|
|
|
|
signs:
|
|
-
|
|
signature: "${artifact}.sig"
|
|
artifacts: checksum
|
|
stdin: '{{ .Env.GPGSIGN_PASSPHRASE }}'
|
|
args: ["--batch", "-u", "{{ .Env.GPG_FINGERPRINT }}", "--output", "${signature}", "--detach-sign", "${artifact}"]
|
|
|
|
snapshot:
|
|
name_template: "{{ .Branch }}-devel"
|
|
|
|
nightly:
|
|
name_template: "{{ .Branch }}"
|
|
|
|
gitea_urls:
|
|
api: https://gitea.com/api/v1
|
|
download: https://gitea.com
|
|
|
|
# yaml-language-server: $schema=https://goreleaser.com/static/schema-pro.json
|
|
# vim: set ts=2 sw=2 tw=0 fo=cnqoj
|