File tree Expand file tree Collapse file tree 2 files changed +31
-1
lines changed Expand file tree Collapse file tree 2 files changed +31
-1
lines changed Original file line number Diff line number Diff line change @@ -78,12 +78,26 @@ jobs:
7878 name : pypi
7979 url : https://pypi.org/p/sphinx-syntax
8080 permissions :
81+ contents : write
8182 id-token : write
8283 steps :
8384 - name : Checkout source
8485 uses : actions/checkout@v4
8586 with :
8687 fetch-depth : 0
88+ - name : Generate release metadata
89+ id : metadata
90+ run : |
91+ ref="${{ github.ref }}";
92+ version=${ref#refs/tags/v};
93+ link="https://pypi.org/p/${{ github.repository }}/${version}";
94+ echo "version=${version}" >> $GITHUB_OUTPUT
95+ echo "link=${link}" >> $GITHUB_OUTPUT
96+ - name : Parse Changelog
97+ id : changelog
98+ uses : mindsers/changelog-reader-action@v2
99+ with :
100+ version : ${{ steps.metadata.outputs.version }}
87101 - name : Set up python 3.12
88102 uses : actions/setup-python@v4
89103 with :
@@ -103,6 +117,17 @@ jobs:
103117 uses : pypa/gh-action-pypi-publish@release/v1
104118 with :
105119 attestations : false
120+ - name : Create GitHub release
121+ uses : softprops/action-gh-release@v2
122+ with :
123+ prerelease : ${{ steps.changelog.outputs.status == 'prereleased' }}
124+ draft : ${{ steps.changelog.outputs.status == 'unreleased' }}
125+ body : |
126+ ## Changelog
127+
128+ ${{ steps.changelog.outputs.changes }}
129+
130+ [See release on PyPi](${{ steps.metadata.outputs.link }})
106131
107132 # Builds sphinx documentation.
108133 #
Original file line number Diff line number Diff line change 11# Changelog
22
3- * v1.0.0:*
3+ ## [ unreleased]
4+
5+ ## [ 1.0.0]
46
57- Initial release.
8+
9+ [ unreleased ] : https://github.com/taminomara/sphinx-syntax/compare/v1.0.0...HEAD
10+ [ 1.0.0 ] : https://github.com/taminomara/sphinx-syntax/releases/tag/v1.0.0
You can’t perform that action at this time.
0 commit comments