Skip to content

Commit

Permalink
调整编译脚本
Browse files Browse the repository at this point in the history
Signed-off-by: allan716 <525223688@qq.com>
  • Loading branch information
allanpk716 committed Jun 28, 2023
1 parent e3b75ea commit d30c5b6
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 57 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: release_client_base
name: release_client

on:
push:
Expand Down
32 changes: 0 additions & 32 deletions .github/workflows/release_client_youtube.yml

This file was deleted.

57 changes: 33 additions & 24 deletions .goreleaser_client_base.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
project_name: client_base
project_name: client

env:
- GO111MODULE=on
Expand All @@ -7,56 +7,64 @@ before:
hooks:
- go mod tidy
builds:
- id: linux-amd64-build
- id: build-base
goos:
- linux
- windows
- darwin
goarch:
- amd64
main: ./cmd/client_base/main.go
ldflags:
- -s -w --extldflags "-static -fpic" -X main.AppVersion=v{{ .Version }}

- id: linux-armv7-build
goos:
- linux
goarch:
- arm
- arm64
goarm:
- 6
- 7
binary_name:
- "{{ .ProjectName }}_base"
main: ./cmd/client_base/main.go
ldflags:
- -s -w --extldflags "-static -fpic" -X main.AppVersion=v{{ .Version }}

- id: linux-arm64-build
-
- id: build-youtube
goos:
- linux
goarch:
- arm64
main: ./cmd/client_base/main.go
ldflags:
- -s -w --extldflags "-static -fpic" -X main.AppVersion=v{{ .Version }}

- id: windows-build
goos:
- windows
- darwin
goarch:
- amd64
main: ./cmd/client_base/main.go
- arm64
goarm:
- 6
- 7
binary_name:
- "{{ .ProjectName }}_youtube"
main: ./cmd/client_youtube/main.go
ldflags:
- -s -w --extldflags "-static -fpic" -X main.AppVersion=v{{ .Version }}


archives:
- id: archive
name_template: "{{ .ProjectName }}-{{ .Version }}-{{ .Os }}-{{ .Arch }}"
- id: archive-base
name_template: "{{ .ProjectName }}_base-{{ .Version }}-{{ .Os }}-{{ .Arch }}-base"
replacements:
darwin: Darwin
linux: Linux
windows: Windows
amd64: x86_64

- id: archive-youtube
name_template: "{{ .ProjectName }}_youtube-{{ .Version }}-{{ .Os }}-{{ .Arch }}-youtube"
replacements:
darwin: Darwin
linux: Linux
windows: Windows
amd64: x86_64

checksum:
name_template: "checksums.txt"

snapshot:
name_template: "{{ .Tag }}-next"

changelog:
sort: asc
filters:
Expand All @@ -65,3 +73,4 @@ changelog:
- "^test:"
- "^TestData:"
- "^TestCode:"
- "^assets:"

0 comments on commit d30c5b6

Please sign in to comment.