File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change 1717 python-version : 3.11
1818 - name : Install dependencies
1919 run : |
20- python -m pip install --upgrade pip setuptools wheel build
20+ python -m pip install --upgrade pip setuptools wheel build semver
2121 - name : Build
2222 run : |
2323 python -m build
@@ -27,19 +27,22 @@ jobs:
2727 with :
2828 user : __token__
2929 password : ${{ secrets.PYPI_PASSWORD }}
30+ - name : Normalize Version
31+ id : normalize
32+ run : echo "version=$(python -c 'import semver; print(semver.Version.parse("${{ github.ref_name }}", optional_minor_and_patch=True))')" >> $GITHUB_OUTPUT
3033 - name : Get Changelog Entry
3134 if : success()
3235 id : changelog_reader
3336 uses : mindsers/changelog-reader-action@v2
3437 with :
35- version : ${{ github.ref_name }}
38+ version : ${{ steps.normalize.outputs.version }}
3639 path : ./docs/changelog.md
3740 - name : Release to GitHub
3841 if : success()
3942 uses : ncipollo/release-action@v1
4043 with :
41- tag : ${{ steps.changelog_reader.outputs.version }}
42- name : Release ${{ steps.changelog_reader.outputs.version }}
44+ tag : ${{ github.ref_name }}
45+ name : Release ${{ github.ref_name }}
4346 body : ${{ steps.changelog_reader.outputs.changes }}
4447 artifacts : dist/**
4548 prerelease : ${{ steps.changelog_reader.outputs.status == 'prereleased' }}
You can’t perform that action at this time.
0 commit comments