From e2a23cbab166d774fddafa30e8ad9391865fea2e Mon Sep 17 00:00:00 2001 From: Mark Ridgwell Date: Tue, 19 Mar 2024 15:45:07 +0000 Subject: [PATCH] logging --- .github/workflows/dotnet-version.yml | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/.github/workflows/dotnet-version.yml b/.github/workflows/dotnet-version.yml index 247b276f..b1fdae2f 100644 --- a/.github/workflows/dotnet-version.yml +++ b/.github/workflows/dotnet-version.yml @@ -64,22 +64,27 @@ jobs: - name: "Update global.json to latest version" if: ${{env.DOTNET_VERSION}} < ${{steps.latest-dotnet-version.outputs.LATEST_RELEASE_VERSION}} shell: bash + working-directory: src run: | echo "Should update to ${{steps.latest-dotnet-version.outputs.LATEST_RELEASE_VERSION}}" - mv "src/global.json" "src/global.json.tmp"; - jq --arg v "$NEW_DOTNET_VERSION" '.version = $v' < "src/global.json.tmp" > "src/global.json"; - [ -f "src/global.json.tmp" ] && rm -f "src/global.json.tmp" - cat "src/global.json" + mv "global.json" "global.json.tmp"; + jq --arg v "$NEW_DOTNET_VERSION" '.version = $v' < "src/global.json.tmp" > "global.json"; + [ -f "global.json.tmp" ] && rm -f "global.json.tmp" + cat "global.json" env: NEW_DOTNET_VERSION: ${{steps.latest-dotnet-version.outputs.LATEST_RELEASE_VERSION}} - name: "Push" if: ${{env.DOTNET_VERSION}} < ${{steps.latest-dotnet-version.outputs.LATEST_RELEASE_VERSION}} shell: bash + working-directory: src run: | git config --global user.name 'fun-version[bot]' git config --global user.email 'credfeto@users.noreply.github.com' - git add "src/global.json" && git commit -m "SDK - Update DotNet SDK to $NEW_DOTNET_VERSION" && git push --set-upstream origin "depends/dotnet/$NEW_DOTNET_VERSION" + git diff + git add "src/global.json" + git commit -m "SDK - Update DotNet SDK to $NEW_DOTNET_VERSION" + git push --set-upstream origin "depends/dotnet/$NEW_DOTNET_VERSION" # - name: "Commit changes to new branch" # if: ${{env.DOTNET_VERSION}} < ${{steps.latest-dotnet-version.outputs.LATEST_RELEASE_VERSION}}