Skip to content

Commit

Permalink
Test
Browse files Browse the repository at this point in the history
  • Loading branch information
rfavreau committed Sep 4, 2022
1 parent 764677f commit d5e2de4
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions .github/workflows/CICD.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ jobs:
- name: Checkout
uses: actions/checkout@v3
with:

fetch-depth: 0

- name: Setup .NET
Expand Down Expand Up @@ -114,8 +115,20 @@ jobs:
- name: Build Release
id: build_release
run: |
MY_RELEASE="N/A"
echo "${MY_RELEASE}" > ./release.txt
CHANGELOG_FILE=./CHANGELOG.md
DEFAULT_BODY="N/A"
if [ -f ${CHANGELOG_FILE} ]; then
gawk -v release=${{ needs.CI.outputs.majorMinorPatch }} '
BEGIN { tag=0 }
/^## / { tag=0 }
/^\[/ { tag=0 }
{ if(tag==1) print $0 }
match($0, /## \[(.*)\]/, arr) { if(arr[1]==release) tag=1 }
' ${CHANGELOG_FILE} | sed -z 's/^\n*\|\n*$//g' > ./release.txt
else
echo $DEFAULT_BODY > ./release.txt
fi
- name: Create Release
id: create_release
Expand Down

0 comments on commit d5e2de4

Please sign in to comment.