Update createchangelog.yml

This commit is contained in:
hubster-bot 2024-07-16 12:01:15 +01:00
parent fb81059c23
commit 3e596193f6

View File

@ -12,18 +12,23 @@ jobs:
- name: Checkout Repository - name: Checkout Repository
uses: actions/checkout@v2 uses: actions/checkout@v2
- name: Extract numeric version and update update.mb file - name: Get all releases and update update.mb file
run: | run: |
version="${{ github.event.release.tag_name }}" # Fetch all releases using GitHub CLI
version_numeric=$(echo $version | grep -o -E '[0-9.]+') gh release list --limit 1000 > releases.txt
{
echo "## $version_numeric" # Extract numeric versions and create update.mb content
echo "Release name: ${{ github.event.release.name }}" echo "" > docs/update.mb
echo "Release body: ${{ github.event.release.body }}" while read -r line; do
echo "" tag=$(echo "$line" | awk '{print $1}')
cat docs/update.mb name=$(echo "$line" | awk -F'\t' '{print $2}')
} > temp_update.mb version_numeric=$(echo "$tag" | grep -o -E '[0-9.]+')
mv temp_update.mb docs/update.mb body=$(gh release view "$tag" --json body --jq .body)
echo "## $version_numeric" >> docs/update.mb
echo "Release name: $name" >> docs/update.mb
echo "Release body: $body" >> docs/update.mb
echo "" >> docs/update.mb
done < releases.txt
- name: Commit and Push Changes - name: Commit and Push Changes
env: env:
@ -32,5 +37,5 @@ jobs:
git config --global user.name 'github-actions[bot]' git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com' git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git add docs/update.mb git add docs/update.mb
git commit -m "Update update.mb for release ${{ github.event.release.tag_name }}" git commit -m "Update update.mb with all releases"
git push git push