Skip to content

Commit

Permalink
Update update-readme.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
whxitte authored Oct 30, 2024
1 parent 2b5f6d9 commit 7894c96
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/update-readme.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ name: Update README with Release Version
on:
release:
types: [published]
workflow_dispatch: # Adds manual trigger

jobs:
update-readme:
Expand All @@ -15,8 +16,8 @@ jobs:
- name: Update README.md with latest version
id: update-readme
run: |
# Get the latest release tag and filename based on the release event
latest_version="${{ github.event.release.tag_name }}"
# If triggered by a release, use the release tag; otherwise, default to 'v1.0.0' for testing
latest_version="${{ github.event.release.tag_name || 'v1.0.0' }}"
deb_file="gixposed_${latest_version#v}.deb"
# Update README.md with the latest version and download link
Expand All @@ -28,5 +29,5 @@ jobs:
git config --global user.name "GitHub Actions"
git config --global user.email "[email protected]"
git add README.md
git commit -m "Update README.md for release ${{ github.event.release.tag_name }}"
git commit -m "Update README.md for release ${{ github.event.release.tag_name || 'manual update' }}"
git push

0 comments on commit 7894c96

Please sign in to comment.