From 91db23426933999dc6f929a0ea62e7d5320bd99e Mon Sep 17 00:00:00 2001 From: c-bata Date: Sat, 9 Sep 2023 00:25:14 +0900 Subject: [PATCH] Recreate goreleaser yaml --- .github/workflows/release.yml | 1 + .gitignore | 2 ++ .goreleaser.yaml | 35 +++++++++++++++++++++++++++++++++++ .goreleaser.yml | 23 ----------------------- 4 files changed, 38 insertions(+), 23 deletions(-) create mode 100644 .goreleaser.yaml delete mode 100644 .goreleaser.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 808f497f..2951469a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -18,6 +18,7 @@ jobs: uses: actions/setup-node@v3 with: node-version: '18' + - run: go install golang.org/x/tools/cmd/stringer@latest - run: | cd dashboard npm install diff --git a/.gitignore b/.gitignore index 113d14b9..00c8b09d 100644 --- a/.gitignore +++ b/.gitignore @@ -12,3 +12,5 @@ dashboard/public/ *.sqlite3 *.db *.bin + +dist/ diff --git a/.goreleaser.yaml b/.goreleaser.yaml new file mode 100644 index 00000000..346db15b --- /dev/null +++ b/.goreleaser.yaml @@ -0,0 +1,35 @@ +before: + hooks: + - go mod tidy + - go generate ./... +builds: + - main: ./cmd/main.go + env: + - CGO_ENABLED=0 + goos: + - linux + - windows + - darwin + +archives: + - format: tar.gz + 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 }} + format_overrides: + - goos: windows + format: zip +checksum: + name_template: 'checksums.txt' +snapshot: + name_template: "{{ incpatch .Version }}-next" +changelog: + sort: asc + filters: + exclude: + - '^docs:' + - '^test:' diff --git a/.goreleaser.yml b/.goreleaser.yml deleted file mode 100644 index 22c21219..00000000 --- a/.goreleaser.yml +++ /dev/null @@ -1,23 +0,0 @@ -project_name: goptuna -env: - - GO111MODULE=auto -before: - hooks: - - go mod tidy -builds: - - main: ./cmd/main.go - binary: goptuna - ldflags: - - -s -w - - -X main.version={{.Version}} - - -X main.revision={{.ShortCommit}} -archives: - - name_template: '{{ .ProjectName }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}' - replacements: - darwin: darwin - linux: linux - 386: i386 - amd64: x86_64 - format: zip -release: - prerelease: auto