Skip to content

Commit ec6fefa

Browse files
Enhance GitHub Actions workflow to automate release notes generation for Arch Linux ISO builds.
- Introduced a new step to generate release notes based on commits since the last release. - Standardized release note content to include features, download instructions, and checksum information. - Updated the release creation step to use the generated release notes instead of hardcoded text.
1 parent be0f850 commit ec6fefa

File tree

1 file changed

+37
-13
lines changed

1 file changed

+37
-13
lines changed

.github/workflows/build.yaml

Lines changed: 37 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,42 @@ jobs:
133133
done
134134
"
135135
136+
- name: Generate Release Notes
137+
id: release_notes
138+
run: |
139+
docker exec arch-container bash -c "
140+
set -euo pipefail
141+
cd /workdir
142+
143+
# Initialize release notes
144+
echo 'RELEASE_NOTES<<EOF' >> \$GITHUB_ENV
145+
echo '🚀 Arch Linux ISO without system beeps (build ${{ env.DATE }})' >> \$GITHUB_ENV
146+
echo '' >> \$GITHUB_ENV
147+
echo '### Changes' >> \$GITHUB_ENV
148+
149+
# Get changes since last release
150+
if git tag | grep -q .; then
151+
LAST_TAG=\$(git describe --tags --abbrev=0 2>/dev/null || echo '')
152+
if [ ! -z \"\$LAST_TAG\" ]; then
153+
echo '#### Commits since last release:' >> \$GITHUB_ENV
154+
git log \"\$LAST_TAG\"..HEAD --pretty=format:'- %s' | grep -v 'Merge' >> \$GITHUB_ENV
155+
echo '' >> \$GITHUB_ENV
156+
fi
157+
fi
158+
159+
# Add standard information
160+
echo '### Features' >> \$GITHUB_ENV
161+
echo '- Automatic daily build' >> \$GITHUB_ENV
162+
echo '- System beeps disabled' >> \$GITHUB_ENV
163+
echo '- ISO SHA256 and SHA512 checksums included' >> \$GITHUB_ENV
164+
echo '' >> \$GITHUB_ENV
165+
echo '### Download' >> \$GITHUB_ENV
166+
echo '- Download the ISO and verify checksums before use' >> \$GITHUB_ENV
167+
echo '' >> \$GITHUB_ENV
168+
echo '### Checksums' >> \$GITHUB_ENV
169+
echo 'SHA256 and SHA512 checksums are available in the uploaded files.' >> \$GITHUB_ENV
170+
echo 'EOF' >> \$GITHUB_ENV
171+
"
136172
137173
- name: Create Release
138174
id: create_release
@@ -141,19 +177,7 @@ jobs:
141177
with:
142178
tag_name: v${{ env.VERSION }}
143179
name: "Arch Linux No Beeps v${{ env.VERSION }}"
144-
body: |
145-
🚀 Arch Linux ISO without system beeps (build ${{ env.DATE }})
146-
147-
### Changes
148-
- Automatic daily build
149-
- System beeps disabled
150-
- ISO SHA256 and SHA512 checksums added
151-
152-
### Download
153-
- Download the ISO and verify checksums before use
154-
155-
### Checksums
156-
SHA256 and SHA512 checksums are available in the uploaded files.
180+
body: ${{ env.RELEASE_NOTES }}
157181
draft: false
158182
prerelease: false
159183
files: |

0 commit comments

Comments
 (0)