File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1010 runs-on : ubuntu-latest
1111 permissions :
1212 id-token : write # Required for trusted publishing
13+ contents : write # Required for creating releases
1314
1415 steps :
1516 - uses : actions/checkout@v4
4041
4142 - name : Publish to PyPI
4243 uses : pypa/gh-action-pypi-publish@release/v1
44+
45+ - name : Extract version from tag
46+ id : version
47+ run : echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT
48+
49+ - name : Extract changelog for this version
50+ id : changelog
51+ run : |
52+ # Extract the section for this version from CHANGELOG.md
53+ VERSION="${{ steps.version.outputs.VERSION }}"
54+ # Get content between this version header and the next --- or ## [
55+ NOTES=$(awk "/^## \[${VERSION}\]/{flag=1; next} /^---$|^## \[/{flag=0} flag" CHANGELOG.md)
56+ # Handle multi-line output
57+ echo "NOTES<<EOF" >> $GITHUB_OUTPUT
58+ echo "$NOTES" >> $GITHUB_OUTPUT
59+ echo "EOF" >> $GITHUB_OUTPUT
60+
61+ - name : Create GitHub Release
62+ uses : softprops/action-gh-release@v2
63+ with :
64+ name : v${{ steps.version.outputs.VERSION }}
65+ body : |
66+ ## What's Changed
67+
68+ ${{ steps.changelog.outputs.NOTES }}
69+
70+ ## Installation
71+
72+ ```bash
73+ pip install quorum-cli==${{ steps.version.outputs.VERSION }}
74+ ```
75+
76+ See [CHANGELOG.md](https://github.com/Detrol/quorum-cli/blob/main/CHANGELOG.md) for full history.
77+ files : dist/*.whl
You can’t perform that action at this time.
0 commit comments