fix: 校验 SteamCMD 游戏本体更新结果 #8
Workflow file for this run
This file contains hidden or 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
| name: Release dst-ws-client | |
| on: | |
| push: | |
| tags: | |
| - "*" | |
| permissions: | |
| contents: write | |
| jobs: | |
| release: | |
| name: linux-amd64 | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: "1.22.x" | |
| - name: Build single-file program | |
| env: | |
| GOOS: linux | |
| GOARCH: amd64 | |
| CGO_ENABLED: "0" | |
| run: | | |
| mkdir -p dist | |
| go build -trimpath -ldflags="-s -w" -o dist/dst-ws-client-linux-amd64 ./dst-ws-client.go | |
| chmod +x dist/dst-ws-client-linux-amd64 | |
| - name: Create GitHub release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| files: | | |
| dist/dst-ws-client-linux-amd64 | |
| DST_SCRIPT.sh | |
| config.example.json | |
| body: | | |
| 本版本修复 DST 游戏本体更新检查,并增强脚本自身更新源的可用性。 | |
| ### 调整与修复 | |
| - 游戏本体更新改为通过 SteamCMD 实际同步,并对比 `version.txt` 与 `appmanifest_343050.acf` 中的 buildid。 | |
| - 同时校验 SteamCMD 退出码与 `App '343050' fully installed` 成功标志,避免错误输出被当作更新完成。 | |
| - 仅在游戏版本号或 buildid 变化时重启服务器,SteamCMD 更新失败时跳过重启。 | |
| - 自动维护中的游戏与 Mod 更新检查调整为约每 125 分钟执行一次,不再每 10 秒触发。 | |
| - 脚本更新默认使用 GitHub 官方仓库,并内置多个经过验证的镜像作为失败回退。 | |
| - 支持通过 `DST_SCRIPT_GIT_URL` 指定最高优先级的自定义镜像。 | |
| - 每个更新源限制等待 45 秒,全部失败时安全停止,不再复制不存在的脚本文件。 | |
| - `dst-ws-client` 世界信息中的版本状态统一提示以 SteamCMD 同步检查为准。 | |
| ### 发布内容 | |
| - Release 附带 `dst-ws-client-linux-amd64`、`DST_SCRIPT.sh` 和 `config.example.json`。 | |
| - `DST_SCRIPT.sh` 脚本版本更新至 `1.8.19`。 | |
| fail_on_unmatched_files: true |