From 8322061ac2d1520c99a791cc1885c1d64bad5ff2 Mon Sep 17 00:00:00 2001 From: eiei114 Date: Tue, 21 Jan 2025 15:39:22 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20version=E5=8F=96=E5=BE=97=E6=96=B9?= =?UTF-8?q?=E6=B3=95=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build.yml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b3264652..5c03f961 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -96,6 +96,13 @@ jobs: restore-keys: | Library- + - name: Get current version + run: | + # ProjectSettings.assetから現在のバージョンを取得 + current_version=$(grep -m1 'bundleVersion:' ProjectSettings/ProjectSettings.asset | awk '{print $2}') + echo "現在のプロジェクトバージョン: $current_version" + echo "current_version=${current_version}" >> $GITHUB_OUTPUT + - name: Run the build for StandaloneWindows64 uses: game-ci/unity-builder@v4.3.0 env: @@ -107,7 +114,7 @@ jobs: unityVersion: '6000.0.31f1' buildName: 'uDesktopMascot' versioning: Custom - version: ${{ steps.vars.outputs.current_version }} + version: ${{ needs.check-branch.outputs.current_version }} - name: Change build folder name run: | @@ -118,7 +125,7 @@ jobs: - name: Push version file run: | cd build - echo "#define MyAppVersion \"${{ steps.vars.outputs.current_version }}\"" > setup.txt + echo "#define MyAppVersion \"${{ needs.check-branch.outputs.current_version }}\"" > setup.txt echo "setup.txt の内容: $(cat setup.txt)" cd .. git config --global user.name "github-actions"