mirror of
https://github.com/ChrisTitusTech/winutil.git
synced 2024-11-14 22:55:52 -06:00
Fixes release log (#2377)
* Update createchangelog.yml * Update createchangelog.yml * Update createchangelog.yml * Update createchangelog.yml --------- Co-authored-by: Chris Titus <contact@christitus.com>
This commit is contained in:
parent
bc213d34d9
commit
5d3d47eeb5
34
.github/workflows/createchangelog.yml
vendored
34
.github/workflows/createchangelog.yml
vendored
@ -2,7 +2,8 @@ name: Update update.mb on Release
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
release:
|
release:
|
||||||
types: [published]
|
types: [published, prereleased]
|
||||||
|
workflow_dispatch: # Add this line to enable manual triggering
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
update-file:
|
update-file:
|
||||||
@ -12,22 +13,23 @@ jobs:
|
|||||||
- name: Checkout Repository
|
- name: Checkout Repository
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
- name: Get latest release and update update.mb file
|
- name: Get all releases and update update.mb file
|
||||||
run: |
|
run: |
|
||||||
# Fetch the latest release using GitHub CLI
|
# Fetch all releases including pre-releases using GitHub CLI
|
||||||
latest_release=$(gh release view --json tagName,name,body --jq '{tag: .tagName, name: .name, body: .body}')
|
gh release list --limit 5 > releases.txt
|
||||||
|
|
||||||
# Extract details
|
# Extract numeric versions and create update.mb content
|
||||||
tag=$(echo "$latest_release" | jq -r '.tag')
|
echo "" > docs/update.mb
|
||||||
name=$(echo "$latest_release" | jq -r '.name')
|
while read -r line; do
|
||||||
body=$(echo "$latest_release" | jq -r '.body')
|
tag=$(echo "$line" | awk '{print $1}')
|
||||||
version_numeric=$(echo "$tag" | grep -o -E '[0-9.]+')
|
name=$(echo "$line" | awk -F'\t' '{print $2}')
|
||||||
|
version_numeric=$(echo "$tag" | grep -o -E '[0-9.]+')
|
||||||
# Append to update.mb
|
body=$(gh release view "$tag" --json body --jq .body)
|
||||||
echo "## $version_numeric" >> docs/update.mb
|
echo "## $version_numeric" >> docs/update.mb
|
||||||
echo "Release name: $name" >> docs/update.mb
|
echo "Release name: $name" >> docs/update.mb
|
||||||
echo "Release body: $body" >> docs/update.mb
|
echo "Release body: $body" >> docs/update.mb
|
||||||
echo "" >> docs/update.mb
|
echo "" >> docs/update.mb
|
||||||
|
done < releases.txt
|
||||||
|
|
||||||
- name: Commit and Push Changes
|
- name: Commit and Push Changes
|
||||||
env:
|
env:
|
||||||
@ -36,5 +38,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 with latest release"
|
git commit -m "Update update.mb with all releases"
|
||||||
git push
|
git push
|
Loading…
Reference in New Issue
Block a user