From 9c658fb118b016f4291195107887874a6a47bceb Mon Sep 17 00:00:00 2001 From: spiritlhl <103393591+spiritLHLS@users.noreply.github.com> Date: Mon, 24 Jun 2024 08:18:01 +0000 Subject: [PATCH] =?UTF-8?q?v0.0.3=20-=20=E5=A2=9E=E5=8A=A0=E5=A4=9A?= =?UTF-8?q?=E5=B9=B3=E5=8F=B0=E7=BC=96=E8=AF=91=E6=B5=8B=E8=AF=95=E9=83=A8?= =?UTF-8?q?=E5=88=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/ci.yaml | 31 +++++++++++++++++++++++++++++++ bk/version.go | 2 +- 2 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/ci.yaml diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 0000000..7f1ab37 --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,31 @@ +name: CI + +on: + workflow_dispatch: + +jobs: + test: + strategy: + matrix: + go: [ '1.22.x' ] + os: [ ubuntu-latest ] + runs-on: ${{ matrix.os }} + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Setup Go + uses: actions/setup-go@v2 + with: + go-version: ${{ matrix.go }} + - name: Test + run: go test ./... -coverprofile=coverage.txt + - name: Create Tag + if: success() # 仅在测试成功时运行 + run: | + git config --global user.name 'github-actions' + git config --global user.email 'github-actions@github.com' + TAG="v0.0.3-$(date +'%Y%m%d%H%M%S')" + git tag $TAG + git push origin $TAG + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/bk/version.go b/bk/version.go index df130cd..e49a52d 100644 --- a/bk/version.go +++ b/bk/version.go @@ -1,4 +1,4 @@ package backtrace -const BackTraceVersion = "0.0.2" +const BackTraceVersion = "v0.0.3" // git tag v0.0.3 var EnableLoger bool \ No newline at end of file