-
-
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
193 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,59 @@ | ||
project_name: go-swd | ||
|
||
before: | ||
hooks: | ||
- go mod tidy | ||
|
||
# 打包归档配置 | ||
archives: | ||
- format: zip | ||
name_template: "{{ .ProjectName }}_{{ .Version }}_src" # 源代码包名称 | ||
files: | ||
- "*.go" # 包含所有 .go 文件 | ||
- "pkg/**" # 包含 pkg 目录 | ||
- "README.md" # 包含 README 文件 | ||
- "LICENSE" # 包含 LICENSE 文件 | ||
- "go.mod" # 包含 go.mod 文件 | ||
- "go.sum" # 包含 go.sum 文件 | ||
|
||
# 发布配置:上传到 GitHub Releases | ||
release: | ||
github: | ||
owner: kirklin # GitHub 用户名/组织名 | ||
name: go-swd # 仓库名称 | ||
|
||
# Changelog 配置:生成发布说明 | ||
changelog: | ||
use: github | ||
sort: asc | ||
filters: | ||
exclude: | ||
- "^test:" # 排除以 "test:" 开头的提交信息 | ||
- "^chore" # 排除 "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 | ||
|
||
# 不需要生成可执行文件,因此不需要 builds 配置 | ||
builds: [] | ||
|
||
# 版本号公告配置 | ||
announce: | ||
skip: false |
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 修改 |