@@ -13,12 +13,12 @@ jobs:
1313 contains(github.event.head_commit.message, 'Prepare version to')
1414 steps :
1515 - name : Checkout code
16- uses : actions/checkout@v5
16+ uses : actions/checkout@v4
1717
1818 - name : Set up Python
19- uses : actions/setup-python@v6
19+ uses : actions/setup-python@v5
2020 with :
21- python-version : " 3.13 "
21+ python-version : " 3.11 "
2222
2323 - name : Extract version from commit message
2424 id : vars
@@ -34,16 +34,20 @@ jobs:
3434
3535 - name : Generate Release Notes from CHANGELOG.md
3636 id : notes
37+ shell : bash
3738 run : |
39+ set -euo pipefail
3840 VERSION="${{ steps.vars.outputs.version }}"
3941 PREV="${{ steps.prev_tag.outputs.prev }}"
40- awk "/^## Version $VERSION/,/^## Version /{if (!/^## Version $VERSION/) print}" CHANGELOG.md | grep '^- ' > changes.txt
42+
43+ # Extrai apenas as linhas que começam com "- " da seção da versão desejada
44+ awk "/^## Version $VERSION\$/ {flag=1; next} /^## Version / {flag=0} flag" CHANGELOG.md | grep '^- ' > changes.txt || true
4145
4246 echo '## What'\''s changed' > RELEASE_NOTES.md
4347 cat changes.txt >> RELEASE_NOTES.md
4448
4549 echo "" >> RELEASE_NOTES.md
46- echo "Full Changelog: [${PREV}...${VERSION}](https://github.com/${{ github.repository }}/compare/v ${PREV}...v${VERSION})" >> RELEASE_NOTES.md
50+ echo "Full Changelog: [${PREV}...${VERSION}](https://github.com/${{ github.repository }}/compare/${PREV}...v${VERSION})" >> RELEASE_NOTES.md
4751
4852 - name : Create GitHub Release
4953 uses : softprops/action-gh-release@v2
5862 run : cargo login ${{ secrets.CRATESIO_TOKEN }}
5963
6064 - name : CratesIO publish
61- run : cargo publish
65+ run : cargo publish
0 commit comments