diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index db4b356..65b85c7 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -59,7 +59,7 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GHT }} - name: test - run: go test ./goecs -v + run: go test -v ./... env: GOPRIVATE: github.com/oneclickvirt/security GITHUB_TOKEN: ${{ secrets.GHT }} diff --git a/发布版本.bat b/发布版本.bat new file mode 100644 index 0000000..a705682 --- /dev/null +++ b/发布版本.bat @@ -0,0 +1,37 @@ +@echo off +setlocal enabledelayedexpansion + +REM 设置仓库路径 +set repo_path=C:\Users\spiritlhl\Documents\GoWorks\ecs + +REM 进入仓库目录 +cd %repo_path% + +REM 添加所有更改并提交 +git add -A +git commit -am "update" + +REM 推送代码到 master 分支并创建标签 +:push +git push -f origin master +if errorlevel 1 ( + echo Push failed. Retrying in 3 seconds... + timeout /nobreak /t 3 >nul + goto push +) + +REM 提示用户输入版本号 +set /p version="Enter the version number (e.g., v1.0.0): " + +REM 创建并推送标签 +git tag %version% +git push origin %version% +if errorlevel 1 ( + echo Tag push failed. Retrying in 3 seconds... + timeout /nobreak /t 3 >nul + goto push_tag +) + +echo Push and tag creation successful. + +endlocal