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
|
runs-on: ubuntu-latest
|
||||||
if: startsWith(github.ref, 'refs/tags/v')
|
if: startsWith(github.ref, 'refs/tags/v')
|
||||||
steps:
|
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
|
- name: Download artifacts
|
||||||
uses: actions/download-artifact@v4
|
uses: actions/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
@@ -85,6 +97,8 @@ jobs:
|
|||||||
uses: softprops/action-gh-release@v2
|
uses: softprops/action-gh-release@v2
|
||||||
with:
|
with:
|
||||||
draft: true
|
draft: true
|
||||||
|
name: ${{ env.releaseName }}
|
||||||
|
body_path: changes.txt
|
||||||
files: "*.zip"
|
files: "*.zip"
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|||||||
Reference in New Issue
Block a user