From 41241befdd83a8d30f71314017bba41bc5874e9a Mon Sep 17 00:00:00 2001 From: KoolShow <51787949+KoolShow@users.noreply.github.com> Date: Sun, 28 Apr 2024 19:46:32 +0800 Subject: [PATCH] Update beta_ci.yml --- .github/workflows/beta_ci.yml | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-) diff --git a/.github/workflows/beta_ci.yml b/.github/workflows/beta_ci.yml index f1c0176fb..446f6f040 100644 --- a/.github/workflows/beta_ci.yml +++ b/.github/workflows/beta_ci.yml @@ -29,25 +29,6 @@ jobs: ref: ${{ github.ref_name }} fetch-depth: 0 - - name: 获取first parent commit次数 - id: get-first-parent-commit-count - run: | - version=$(yq e .version pubspec.yaml | cut -d "+" -f 1) - recent_release_tag=$(git tag -l | grep $version | egrep -v "[-|+]" || true) - if [[ "x$recent_release_tag" == "x" ]]; then - echo "当前版本tag不存在,请手动生成tag." - exit 1 - fi - git log --oneline --first-parent $recent_release_tag..HEAD - first_parent_commit_count=$(git rev-list --first-parent --count $recent_release_tag..HEAD) - echo "count=$first_parent_commit_count" >> $GITHUB_OUTPUT - - - name: 获取最后一次提交 - id: get-last-commit - run: | - last_commit=$(git log -1 --pretty="%h %s" --first-parent) - echo "last_commit=$last_commit" >> $GITHUB_OUTPUT - - name: 更新版本号 id: version run: | @@ -58,8 +39,7 @@ jobs: #RUN_NUMBER=${{ github.run_number }} # 构建新版本号 - NEW_VERSION=$VERSION-beta.${{ steps.get-first-parent-commit-count.outputs.count }} - + NEW_VERSION=${{ github.run_number }} # 输出新版本号 echo "New version: $NEW_VERSION"