-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
192 additions
and
4 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,37 @@ | ||
name: Release | ||
|
||
permissions: | ||
id-token: write | ||
contents: write | ||
|
||
on: | ||
push: | ||
tags: | ||
- "v*" | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
# 检出代码 | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 # 官方推荐,确保完整的历史记录,GoReleaser 需要使用 tag 信息 | ||
|
||
# 设置 Go 环境,使用 go.mod 中定义的版本 | ||
- name: Set up Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version-file: "go.mod" # 自动读取 go.mod 中的 Go 版本 | ||
|
||
# 运行 GoReleaser 来构建、打包和发布版本 | ||
- name: Run GoReleaser | ||
uses: goreleaser/goreleaser-action@v5 | ||
with: | ||
distribution: goreleaser # GoReleaser 的发行版本 | ||
version: latest # 使用最新版本的 GoReleaser | ||
args: release --clean # 发布并清理临时文件 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # 使用 GitHub token 授权 GoReleaser 发布版本 |
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,58 @@ | ||
project_name: go-swd | ||
|
||
before: | ||
hooks: | ||
- go mod tidy | ||
|
||
builds: | ||
- goos: | ||
- windows | ||
- linux | ||
- darwin | ||
goarch: | ||
- amd64 | ||
- arm64 | ||
main: ./cmd/main.go | ||
env: | ||
- CGO_ENABLED=0 | ||
ldflags: "-s -w -X version.Version={{.Version}}" | ||
|
||
archives: | ||
- format: zip | ||
name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}" | ||
|
||
release: | ||
github: | ||
owner: kirklin | ||
name: go-swd | ||
|
||
changelog: | ||
sort: asc | ||
use: github | ||
filters: | ||
exclude: | ||
- "^test:" | ||
- "^chore" | ||
- "merge conflict" | ||
- Merge pull request | ||
- Merge remote-tracking branch | ||
- Merge branch | ||
- go mod tidy | ||
groups: | ||
- title: "New Features" | ||
regexp: "^.*feat[(\\w)]*:+.*$" | ||
order: 100 | ||
- title: "Bug fixes" | ||
regexp: "^.*fix[(\\w)]*:+.*$" | ||
order: 200 | ||
- title: "Dependency updates" | ||
regexp: "^.*chore\\(deps\\)*:+.*$" | ||
order: 300 | ||
- title: "Documentation updates" | ||
regexp: "^.*docs[(\\w)]*:+.*$" | ||
order: 400 | ||
- title: "Other work" | ||
order: 9999 | ||
|
||
announce: | ||
skip: "{{gt .Patch 0}}" |
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 |
---|---|---|
|
@@ -27,4 +27,7 @@ | |
赌技 | ||
赌运 | ||
赌金 | ||
赌本 | ||
赌本 | ||
10bet娱乐城 | ||
12博娱乐城 | ||
188金宝博娱乐城 |
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 |
---|---|---|
|
@@ -323,4 +323,11 @@ gong和 | |
朱容基 | ||
法轮功 | ||
李洪志 | ||
新疆骚乱 | ||
新疆骚乱 | ||
1党专制 | ||
1党独裁 | ||
1党专政 | ||
1党执政 | ||
2010诺贝尔和平奖 | ||
23条 | ||
2008年灾年 |
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
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,4 @@ | ||
package version | ||
|
||
// Version is the current version of the go-swd | ||
var Version = "v0.0.1" // 默认版本号,可通过 ldflags 修改 |