Skip to content

Commit ebfcd2c

Browse files
authored
github actions init (#20)
* github actions init * remove go cache * change order * cache go version * skip really request test
1 parent 076ab13 commit ebfcd2c

File tree

5 files changed

+52
-1
lines changed

5 files changed

+52
-1
lines changed

.github/workflows/go.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Sec CI
2+
on: push
3+
jobs:
4+
build:
5+
name: Build
6+
runs-on: ubuntu-latest
7+
steps:
8+
- name: Check out source code
9+
uses: actions/checkout@v4
10+
11+
- name: Set up Go Env
12+
uses: actions/setup-go@v4
13+
with:
14+
go-version-file: go.mod
15+
cache: true
16+
id: go
17+
18+
- name: Test
19+
run: go test -v ./...

.github/workflows/release.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: build-go-binary
2+
3+
on:
4+
release:
5+
types: [created] # 表示在创建新的 Release 时触发
6+
7+
jobs:
8+
build-go-binary:
9+
runs-on: ubuntu-latest
10+
strategy:
11+
matrix:
12+
goos: [linux, windows, darwin] # 需要打包的系统
13+
goarch: [amd64, arm64] # 需要打包的架构
14+
exclude: # 排除某些平台和架构
15+
- goarch: arm64
16+
goos: windows
17+
steps:
18+
- uses: actions/checkout@v4
19+
- uses: wangyoucao577/go-release-action@v1
20+
with:
21+
github_token: ${{ secrets.GITHUB_TOKEN }} # 一个默认的变量,用来实现往 Release 中添加文件
22+
goos: ${{ matrix.goos }}
23+
goarch: ${{ matrix.goarch }}
24+
goversion: 1.22 # 可以指定编译使用的 Golang 版本
25+
binary_name: "sec" # 可以指定二进制文件的名称
26+
extra_files: README.md # 需要包含的额外文件
27+
project_path: "./"

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# sec change log
22

3+
### v0.1.1
4+
5+
1. 添加 github actions
6+
37
### v0.1.0
48

59
1. quote 拆分成子命令

provider/sina/sina_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ func TestParseBasicSecuritys(t *testing.T) {
3030
}
3131

3232
func TestProfile(t *testing.T) {
33+
t.Skip("just test for dev/debug")
3334
// Profile("688047")
3435
quote, part, err := Info("SH688047")
3536
require.Nil(t, err)

version/version.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
package version
22

3-
var Version string = "v0.1.0"
3+
var Version string = "v0.1.1"

0 commit comments

Comments
 (0)