Skip to content

Commit

Permalink
Update update-release-version-in-readme.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
alhasacademy96 authored Oct 23, 2024
1 parent c6316ef commit 6e55c5d
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/update-release-version-in-readme.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,12 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 0 # Fetch all history so we can push back to the branch


- name: Switch to the main branch
run: |
git fetch origin main # Ensure main branch is up to date
git checkout main # Switch to the main branch
- name: Get latest release version
run: echo "LATEST_VERSION=${{ github.event.release.tag_name }}" >> $GITHUB_ENV

Expand All @@ -26,4 +31,4 @@ jobs:
git config --global user.name "github-actions[bot]"
git add README.md
git commit -m "Update latest release version to $LATEST_VERSION"
git push origin HEAD:main # Ensure we're pushing to the main branch
git push origin main # Push to the main branch

0 comments on commit 6e55c5d

Please sign in to comment.