From 3240cd9a161177af10d8a86ce37c5d95299f1bf5 Mon Sep 17 00:00:00 2001 From: VillagerTom Date: Mon, 22 Jul 2024 11:25:14 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E9=A2=91=E9=81=93=E6=B6=88=E6=81=AF?= =?UTF-8?q?=E8=A1=A5=E5=85=85commit=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build-ios.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/build-ios.yml b/.github/workflows/build-ios.yml index 18e9a076b..874246adf 100644 --- a/.github/workflows/build-ios.yml +++ b/.github/workflows/build-ios.yml @@ -20,6 +20,7 @@ jobs: outputs: # 定义输出变量 version,以便在其他job中引用 new_version: ${{ steps.get-last-tag.outputs.tag}} + last_commit: ${{ steps.get-last-commit.outputs.last_commit }} steps: - name: Checkout code @@ -27,6 +28,12 @@ jobs: with: fetch-depth: 0 + - name: 获取最后一次提交 + id: get-last-commit + run: | + last_commit=$(git log -1 --pretty="%h %s" --first-parent) + echo "last_commit=$last_commit" >> $GITHUB_OUTPUT + - name: 获取最后一个tag id: get-last-tag run: |