Skip to content

Commit

Permalink
fix: version取得方法修正
Browse files Browse the repository at this point in the history
  • Loading branch information
eiei114 committed Jan 21, 2025
1 parent ab188f0 commit 8322061
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/[email protected]
env:
Expand All @@ -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: |
Expand All @@ -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"
Expand Down

0 comments on commit 8322061

Please sign in to comment.