mirror of
https://github.com/DanielSWolf/rhubarb-lip-sync.git
synced 2026-11-21 12:25:08 +00:00
CI script: Auto-fill release name and changes from changelog
This commit is contained in:
14
.github/workflows/ci.yml
vendored
14
.github/workflows/ci.yml
vendored
@@ -77,6 +77,18 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
if: startsWith(github.ref, 'refs/tags/v')
|
||||
steps:
|
||||
- name: Checkout changelog
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
sparse-checkout: CHANGELOG.md
|
||||
- name: Extract changelog data
|
||||
run: |
|
||||
# Store the release name in env.releaseName
|
||||
HEADER=$(awk '/^## / {sub(/^## /, ""); print; exit}' CHANGELOG.md)
|
||||
echo "releaseName=$HEADER" >> $GITHUB_ENV
|
||||
|
||||
# Store the changelog body in changes.txt
|
||||
awk '/^## / {if (found) exit; found=1; next} found' CHANGELOG.md > changes.txt
|
||||
- name: Download artifacts
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
@@ -85,6 +97,8 @@ jobs:
|
||||
uses: softprops/action-gh-release@v2
|
||||
with:
|
||||
draft: true
|
||||
name: ${{ env.releaseName }}
|
||||
body_path: changes.txt
|
||||
files: "*.zip"
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
Reference in New Issue
Block a user