-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: 统一修改命令名为 traffic-replicator ,增加 goreleaser 配置及 github ci 配置
- Loading branch information
Showing
16 changed files
with
196 additions
and
8 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,35 @@ | ||
# This workflow will build a golang project | ||
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go | ||
|
||
name: 标签推送😂 | ||
|
||
on: | ||
push: | ||
tags: | ||
- '*' | ||
jobs: | ||
goreleaser: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- name: Set up Go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: stable | ||
# More assembly might be required: Docker logins, GPG, etc. | ||
# It all depends on your needs. | ||
- name: Run GoReleaser | ||
uses: goreleaser/goreleaser-action@v5 | ||
with: | ||
# either 'goreleaser' (default) or 'goreleaser-pro' | ||
distribution: goreleaser | ||
version: latest | ||
args: release --clean | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
# Your GoReleaser Pro key, if you are using the 'goreleaser-pro' distribution | ||
# GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }} | ||
|
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,32 @@ | ||
builds: | ||
- id: "traffic-replicator" | ||
main: cmd/traffic-replicator/main.go | ||
goos: | ||
- linux | ||
- darwin | ||
- windows | ||
goarch: | ||
- amd64 | ||
- arm64 | ||
- 386 | ||
env: | ||
- CGO_ENABLED=0 | ||
|
||
archives: | ||
- id: foo | ||
name_template: >- | ||
{{ .ProjectName }}_ | ||
{{- .Version }}_ | ||
{{- if eq .Os "linux"}}Linux{{ else if eq .Os "darwin"}}Darwin{{ else }}{{ .Os }}{{ end }}_ | ||
{{- if eq .Arch "386" }}i386{{ else if eq .Arch "amd64" }}x86_64{{ else }}{{ .Arch }}{{ end }} | ||
checksum: | ||
name_template: 'checksums.txt' | ||
snapshot: | ||
name_template: "{{ .Tag }}-next" | ||
changelog: | ||
sort: asc | ||
filters: | ||
exclude: | ||
- '^docs:' | ||
- '^test:' |
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
File renamed without changes.
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 @@ | ||
[{"name":"traffic-replicator","path":"dist/traffic-replicator_linux_386/traffic-replicator","goos":"linux","goarch":"386","internal_type":4,"type":"Binary","extra":{"Binary":"traffic-replicator","Ext":"","ID":"traffic-replicator"}},{"name":"traffic-replicator.exe","path":"dist/traffic-replicator_windows_386/traffic-replicator.exe","goos":"windows","goarch":"386","internal_type":4,"type":"Binary","extra":{"Binary":"traffic-replicator","Ext":".exe","ID":"traffic-replicator"}},{"name":"traffic-replicator","path":"dist/traffic-replicator_linux_amd64_v1/traffic-replicator","goos":"linux","goarch":"amd64","goamd64":"v1","internal_type":4,"type":"Binary","extra":{"Binary":"traffic-replicator","Ext":"","ID":"traffic-replicator"}},{"name":"traffic-replicator.exe","path":"dist/traffic-replicator_windows_arm64/traffic-replicator.exe","goos":"windows","goarch":"arm64","internal_type":4,"type":"Binary","extra":{"Binary":"traffic-replicator","Ext":".exe","ID":"traffic-replicator"}},{"name":"traffic-replicator","path":"dist/traffic-replicator_linux_arm64/traffic-replicator","goos":"linux","goarch":"arm64","internal_type":4,"type":"Binary","extra":{"Binary":"traffic-replicator","Ext":"","ID":"traffic-replicator"}},{"name":"traffic-replicator.exe","path":"dist/traffic-replicator_windows_amd64_v1/traffic-replicator.exe","goos":"windows","goarch":"amd64","goamd64":"v1","internal_type":4,"type":"Binary","extra":{"Binary":"traffic-replicator","Ext":".exe","ID":"traffic-replicator"}},{"name":"traffic-replicator","path":"dist/traffic-replicator_darwin_amd64_v1/traffic-replicator","goos":"darwin","goarch":"amd64","goamd64":"v1","internal_type":4,"type":"Binary","extra":{"Binary":"traffic-replicator","Ext":"","ID":"traffic-replicator"}},{"name":"traffic-replicator","path":"dist/traffic-replicator_darwin_arm64/traffic-replicator","goos":"darwin","goarch":"arm64","internal_type":4,"type":"Binary","extra":{"Binary":"traffic-replicator","Ext":"","ID":"traffic-replicator"}}] |
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,119 @@ | ||
project_name: traffic-replicator | ||
release: | ||
github: | ||
owner: taills | ||
name: traffic-replicator | ||
name_template: '{{.Tag}}' | ||
builds: | ||
- id: traffic-replicator | ||
goos: | ||
- linux | ||
- darwin | ||
- windows | ||
goarch: | ||
- amd64 | ||
- arm64 | ||
- "386" | ||
goarm: | ||
- "6" | ||
gomips: | ||
- hardfloat | ||
goamd64: | ||
- v1 | ||
targets: | ||
- linux_amd64_v1 | ||
- linux_arm64 | ||
- linux_386 | ||
- darwin_amd64_v1 | ||
- darwin_arm64 | ||
- windows_amd64_v1 | ||
- windows_arm64 | ||
- windows_386 | ||
dir: . | ||
main: cmd/traffic-replicator/main.go | ||
binary: traffic-replicator | ||
builder: go | ||
gobinary: go | ||
command: build | ||
ldflags: | ||
- -s -w -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{.Date}} -X main.builtBy=goreleaser | ||
env: | ||
- CGO_ENABLED=0 | ||
archives: | ||
- id: foo | ||
name_template: '{{ .ProjectName }}_ {{- .Version }}_ {{- if eq .Os "linux"}}Linux{{ else if eq .Os "darwin"}}Darwin{{ else }}{{ .Os }}{{ end }}_ {{- if eq .Arch "386" }}i386{{ else if eq .Arch "amd64" }}x86_64{{ else }}{{ .Arch }}{{ end }}' | ||
format: tar.gz | ||
files: | ||
- src: license* | ||
- src: LICENSE* | ||
- src: readme* | ||
- src: README* | ||
- src: changelog* | ||
- src: CHANGELOG* | ||
snapshot: | ||
name_template: '{{ .Tag }}-next' | ||
checksum: | ||
name_template: checksums.txt | ||
algorithm: sha256 | ||
changelog: | ||
filters: | ||
exclude: | ||
- '^docs:' | ||
- '^test:' | ||
sort: asc | ||
dist: dist | ||
env_files: | ||
github_token: ~/.config/goreleaser/github_token | ||
gitlab_token: ~/.config/goreleaser/gitlab_token | ||
gitea_token: ~/.config/goreleaser/gitea_token | ||
source: | ||
name_template: '{{ .ProjectName }}-{{ .Version }}' | ||
format: tar.gz | ||
gomod: | ||
gobinary: go | ||
announce: | ||
twitter: | ||
message_template: '{{ .ProjectName }} {{ .Tag }} is out! Check it out at {{ .ReleaseURL }}' | ||
mastodon: | ||
message_template: '{{ .ProjectName }} {{ .Tag }} is out! Check it out at {{ .ReleaseURL }}' | ||
server: "" | ||
reddit: | ||
title_template: '{{ .ProjectName }} {{ .Tag }} is out!' | ||
url_template: '{{ .ReleaseURL }}' | ||
slack: | ||
message_template: '{{ .ProjectName }} {{ .Tag }} is out! Check it out at {{ .ReleaseURL }}' | ||
username: GoReleaser | ||
discord: | ||
message_template: '{{ .ProjectName }} {{ .Tag }} is out! Check it out at {{ .ReleaseURL }}' | ||
author: GoReleaser | ||
color: "3888754" | ||
icon_url: https://goreleaser.com/static/avatar.png | ||
teams: | ||
title_template: '{{ .ProjectName }} {{ .Tag }} is out!' | ||
message_template: '{{ .ProjectName }} {{ .Tag }} is out! Check it out at {{ .ReleaseURL }}' | ||
color: '#2D313E' | ||
icon_url: https://goreleaser.com/static/avatar.png | ||
smtp: | ||
subject_template: '{{ .ProjectName }} {{ .Tag }} is out!' | ||
body_template: 'You can view details from: {{ .ReleaseURL }}' | ||
mattermost: | ||
message_template: '{{ .ProjectName }} {{ .Tag }} is out! Check it out at {{ .ReleaseURL }}' | ||
title_template: '{{ .ProjectName }} {{ .Tag }} is out!' | ||
username: GoReleaser | ||
linkedin: | ||
message_template: '{{ .ProjectName }} {{ .Tag }} is out! Check it out at {{ .ReleaseURL }}' | ||
telegram: | ||
message_template: '{{ .ProjectName }} {{ mdv2escape .Tag }} is out! Check it out at {{ mdv2escape .ReleaseURL }}' | ||
parse_mode: MarkdownV2 | ||
webhook: | ||
message_template: '{ "message": "{{ .ProjectName }} {{ .Tag }} is out! Check it out at {{ .ReleaseURL }}"}' | ||
content_type: application/json; charset=utf-8 | ||
opencollective: | ||
title_template: '{{ .Tag }}' | ||
message_template: '{{ .ProjectName }} {{ .Tag }} is out!<br/>Check it out at <a href="{{ .ReleaseURL }}">{{ .ReleaseURL }}</a>' | ||
git: | ||
tag_sort: -version:refname | ||
github_urls: | ||
download: https://github.com | ||
gitlab_urls: | ||
download: https://gitlab.com |
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 @@ | ||
{"project_name":"traffic-replicator","tag":"v0.0.0","previous_tag":"","version":"v0.0.0-next","commit":"50c4229e0d82d2cb2993fc26b2d7996f7cbc35a7","date":"2024-01-10T12:44:33.499928+08:00","runtime":{"goos":"darwin","goarch":"amd64"}} |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.