From 85edf35f6ef71cc76fc10089e6f1c06be29e5c39 Mon Sep 17 00:00:00 2001 From: Gabriel Ryder Date: Wed, 11 Sep 2024 10:02:15 +0800 Subject: [PATCH] Fix: Document CI process and some issues --- .github/version.yml | 2 +- .github/workflows/build.yml | 20 +++++++++++++++++++- docs/apis/update.md | 6 ++++-- docs/contribution/standard.md | 2 +- update-timeline.md | 1 - 5 files changed, 25 insertions(+), 6 deletions(-) diff --git a/.github/version.yml b/.github/version.yml index 4ba2c40..5c95d44 100644 --- a/.github/version.yml +++ b/.github/version.yml @@ -1 +1 @@ -version: 2.0.0 \ No newline at end of file +version: 2.1.0 \ No newline at end of file diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f807032..8556a40 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -67,10 +67,28 @@ jobs: echo "Updating version from $CURRENT_VERSION to $NEW_VERSION" echo "NEW_VERSION=${NEW_VERSION}" >> $GITHUB_ENV + - name: Stop if no version update + if: env.NEW_VERSION == 'null' + run: echo "No version update needed. Stopping workflow." + + - name: Update version.yml + if: env.NEW_VERSION != 'null' + run: | + yq eval ".version = \"$NEW_VERSION\"" -i .github/version.yml + + - name: Commit updated version.yml + if: env.NEW_VERSION != 'null' + run: | + git config --global user.name "github-actions" + git config --global user.email "github-actions@github.com" + git add .github/version.yml + git commit -m "chore: update version to $NEW_VERSION" + git push + - name: Create Release id: create_release uses: actions/create-release@v1 - if: steps.update_version.outputs.NEW_VERSION != 'null' + if: env.NEW_VERSION != 'null' env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: diff --git a/docs/apis/update.md b/docs/apis/update.md index ae14a23..98acbca 100644 --- a/docs/apis/update.md +++ b/docs/apis/update.md @@ -11,7 +11,7 @@ 7. 服务器返回最新版本的游戏增量包。 8. 客户端将最新版本的游戏覆盖安装到本地。 -![Update process](../../public/lc1.png "Update process") +![Update process](https://doc.dooper.top/lc1.png "Update process") ## getLatestVersion @@ -174,6 +174,8 @@ 下载增量包,将 GenerateIncrementalPackage 返回的 packageHash 参数传入后,服务器会返回文件,客户端接收即可。 +或者使用 getUpdateFileList API 之后,将 UUID 参数传入后,服务器也会返回文件,客户端接收即可。 + | 请求方式 | GET | | -------- | ---------------------------------- | | 请求地址 | /v1/update/download | @@ -188,7 +190,7 @@ | 参数 | 必填 | 简介 | 类型 | 示例值 | | ----- | ---- | -------- | ------ | ------------------ | -| params | 是 | 文件哈希值 | String | 8DF7S9ADF87S9 | +| fileHash | 是 | 文件哈希值或 UUID | String | 8DF7S9ADF87S9 | 请求示例: diff --git a/docs/contribution/standard.md b/docs/contribution/standard.md index c3d342a..7fb6d1b 100644 --- a/docs/contribution/standard.md +++ b/docs/contribution/standard.md @@ -33,7 +33,7 @@ 你可以在下图中看到这些 `repo` 之间的关系: -![Repo Diagram](../../public/sd1.png "Repo Diagram") +![Repo Diagram](https://doc.dooper.top/sd1.png "Repo Diagram") ## 开始 diff --git a/update-timeline.md b/update-timeline.md index 89398e2..a357b2b 100644 --- a/update-timeline.md +++ b/update-timeline.md @@ -1,6 +1,5 @@ --- title: 更新时间轴 -aside: false --- # 更新时间轴