Skip to content

Commit

Permalink
add update readme action
Browse files Browse the repository at this point in the history
  • Loading branch information
b3hr4d committed Mar 2, 2024
1 parent a992a91 commit d977ec4
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/update-readme.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Build and Release

on:
workflow_dispatch:

jobs:
update-readme:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Debugging - Show README content
run: cat ./packages/core/README.md

- name: Update README
run: |
LATEST_TAG=$(git describe --tags `git rev-list --tags --max-count=1`)
LATEST_RELEASE_NOTES=$(gh release view $LATEST_TAG --json body -q .body)
sed -i "/^## Latest Release/c\## Latest Release\n\n$LATEST_RELEASE_NOTES" ./packages/core/README.md
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git commit -am "Update README with the latest release info"
git push
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit d977ec4

Please sign in to comment.