-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
27 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |