Skip to content

Commit

Permalink
switch to branch
Browse files Browse the repository at this point in the history
  • Loading branch information
credfeto committed Mar 19, 2024
1 parent c635c80 commit efed50e
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions .github/workflows/dotnet-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,14 @@ jobs:
echo "Latest installed dotnet version: ${{steps.latest-dotnet-version.outputs.LATEST_RELEASE_VERSION}}"
echo "Requested dotnet version: ${{env.DOTNET_VERSION}}"
- name: "Switch to version branch"
if: ${{env.DOTNET_VERSION}} < ${{steps.latest-dotnet-version.outputs.LATEST_RELEASE_VERSION}}
shell: bash
run: |
git checkout "depends/dotnet/${{env.NEW_DOTNET_VERSION}}" || git checkout -b "depends/dotnet/${{env.NEW_DOTNET_VERSION}}"
env:
NEW_DOTNET_VERSION: ${{steps.latest-dotnet-version.outputs.LATEST_RELEASE_VERSION}}

- name: "Update global.json to latest version"
if: ${{env.DOTNET_VERSION}} < ${{steps.latest-dotnet-version.outputs.LATEST_RELEASE_VERSION}}
shell: bash
Expand All @@ -65,24 +73,14 @@ jobs:
env:
NEW_DOTNET_VERSION: ${{steps.latest-dotnet-version.outputs.LATEST_RELEASE_VERSION}}

# - name: "Update global.json to latest version"
# if: ${{env.DOTNET_VERSION}} < ${{steps.latest-dotnet-version.outputs.LATEST_RELEASE_VERSION}}
# shell: bash
# run: |
# git checkout -b "depends/dotnet/${{env.NEW_DOTNET_VERSION}}"
# env:
# NEW_DOTNET_VERSION: ${{steps.latest-dotnet-version.outputs.LATEST_RELEASE_VERSION}}

- name: "Commit changes to new branch"
if: ${{env.DOTNET_VERSION}} < ${{steps.latest-dotnet-version.outputs.LATEST_RELEASE_VERSION}}
uses: stefanzweifel/[email protected]
with:
commit_message: "SDK - Update DotNet SDK to ${{steps.latest-dotnet-version.outputs.LATEST_RELEASE_VERSION}}"
branch: "depends/dotnet/${{steps.latest-dotnet-version.outputs.LATEST_RELEASE_VERSION}}"
create_branch: true
file_pattern: src/global.json
commit_user_name: "fun-version[bot]"
commit_user_email: "[email protected]"
commit_author: "fun-version[bot] <[email protected]>"
skip_dirty_check: false
push_options: --force

0 comments on commit efed50e

Please sign in to comment.