diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 99657c22..1692ab98 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -44,7 +44,7 @@ jobs: id: get-previous-codes run: | version=$(yq e .version pubspec.yaml | cut -d "+" -f 1) - last_tag=$(git describe --tags | awk -F"-" '{for(i=1;i<=NF-2;i++) printf "%s", $i}') + last_tag=$(git tag --sort=committerdate | tail -1) if $(echo $last_tag | grep -v "+"); then echo "Tag格式不正确" exit 1