mirror of
https://github.com/ChrisTitusTech/winutil.git
synced 2024-12-22 14:01:31 -06:00
280f8a7dbc
Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 4. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v2...v4) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
43 lines
1.4 KiB
YAML
43 lines
1.4 KiB
YAML
name: Update update.mb on Release
|
|
|
|
on:
|
|
release:
|
|
types: [published, prereleased]
|
|
workflow_dispatch: # Add this line to enable manual triggering
|
|
|
|
jobs:
|
|
update-file:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout Repository
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Get all releases and update update.mb file
|
|
run: |
|
|
# Fetch all releases including pre-releases using GitHub CLI
|
|
gh release list --limit 5 > releases.txt
|
|
|
|
# Extract numeric versions and create update.mb content
|
|
echo "" > docs/update.mb
|
|
while read -r line; do
|
|
tag=$(echo "$line" | awk '{print $1}')
|
|
name=$(echo "$line" | awk -F'\t' '{print $2}')
|
|
version_numeric=$(echo "$tag" | grep -o -E '[0-9.]+')
|
|
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
|
|
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 with all releases"
|
|
git push
|