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"