Skip to content

Commit b21ee44

Browse files
committed
fix create release notes step
1 parent 3a7c484 commit b21ee44

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

.github/workflows/cd.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,14 @@ jobs:
3434
run: echo "::set-output name=version::${GITHUB_REF#refs/*/}"
3535
id: release-version
3636
- name: Create release notes for version ${{ steps.release-version.outputs.version }}
37-
run: npm run --silent changelog > RELEASE_NOTES_${{ steps.release-version.outputs.version }}.md
37+
# run: npm run --silent changelog > RELEASE_NOTES_${{ steps.release-version.outputs.version }}.md
38+
run: |
39+
if [ $((grep $(grep -m1 'version' package.json | cut -d '"' -f 4) -n CHANGELOG.md || echo 0) | cut -d ':' -f 1) -eq 3 ]; then \
40+
awk '/##/{++c;next} c==1' CHANGELOG.md | awk '!/^$/'; \
41+
else \
42+
>&2 echo 'Unchecked version'; \
43+
echo 1; \
44+
fi > RELEASE_NOTES_${{ steps.release-version.outputs.version }}.md
3845
# https://github.com/ncipollo/release-action
3946
- name: Create github release
4047
uses: ncipollo/release-action@v1

0 commit comments

Comments
 (0)