Skip to content

Commit 1e78ad2

Browse files
committed
extract changes for release text body
Bey vorbeeld van memowe/uptime-dick which looks like a Pennäler-Scherz.
1 parent cf12578 commit 1e78ad2

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

.github/workflows/release.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,18 @@ jobs:
1919
distribution: 'adopt'
2020
cache: maven
2121

22-
- name: run maven
22+
- name: build
2323
run: ./mvnw -Drevision=${{github.ref_name}} -Dchangelist="" --batch-mode --update-snapshots package
2424

25+
- name: Extract release changes
26+
id: extract_changes
27+
run: |
28+
TAG=${{ github.ref_name }}
29+
CHANGES="$(perl -nle '($v = "'"$TAG"'") =~ s/^v//; print if /^### $v / ... /^### / and not /^###/' CHANGES.md)"
30+
echo "CHANGES<<EOF" >> $GITHUB_OUTPUT
31+
echo "$CHANGES" >> $GITHUB_OUTPUT
32+
echo "EOF" >> $GITHUB_OUTPUT
33+
2534
- name: create release
2635
uses: actions/create-release@v1
2736
id: create_release
@@ -30,7 +39,7 @@ jobs:
3039
prerelease: false
3140
tag_name: ${{ github.ref }}
3241
release_name: ${{ github.ref }}
33-
body_path: changeLog.md
42+
body: ${{ steps.extract_changes.outputs.CHANGES }}
3443
env:
3544
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3645

changeLog.md renamed to CHANGES.md

File renamed without changes.

0 commit comments

Comments
 (0)