2024-07-16 05:58:13 -05:00
|
|
|
name: Update update.mb on Release
|
|
|
|
|
2024-07-13 10:58:07 -05:00
|
|
|
on:
|
|
|
|
release:
|
|
|
|
types: [published]
|
|
|
|
|
|
|
|
jobs:
|
2024-07-16 05:58:13 -05:00
|
|
|
update-file:
|
2024-07-13 10:58:07 -05:00
|
|
|
runs-on: ubuntu-latest
|
2024-07-16 05:58:13 -05:00
|
|
|
|
2024-07-13 10:58:07 -05:00
|
|
|
steps:
|
2024-07-16 05:58:13 -05:00
|
|
|
- name: Checkout Repository
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
|
|
|
|
- name: Extract numeric version and update update.mb file
|
|
|
|
run: |
|
|
|
|
version="${{ github.event.release.tag_name }}"
|
|
|
|
version_numeric=$(echo $version | grep -o -E '[0-9.]+')
|
|
|
|
{
|
|
|
|
echo "## $version_numeric"
|
|
|
|
echo "Release name: ${{ github.event.release.name }}"
|
|
|
|
echo "Release body: ${{ github.event.release.body }}"
|
|
|
|
echo ""
|
|
|
|
cat docs/update.mb
|
|
|
|
} > temp_update.mb
|
|
|
|
mv temp_update.mb docs/update.mb
|
|
|
|
|
|
|
|
- name: Commit and Push Changes
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
run: |
|
|
|
|
git config --global user.name 'github-actions[bot]'
|
|
|
|
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
|
|
|
|
git add docs/update.mb
|
|
|
|
git commit -m "Update update.mb for release ${{ github.event.release.tag_name }}"
|
|
|
|
git push
|