File tree 1 file changed +7
-4
lines changed
1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change 17
17
python-version : 3.11
18
18
- name : Install dependencies
19
19
run : |
20
- python -m pip install --upgrade pip setuptools wheel build
20
+ python -m pip install --upgrade pip setuptools wheel build semver
21
21
- name : Build
22
22
run : |
23
23
python -m build
@@ -27,19 +27,22 @@ jobs:
27
27
with :
28
28
user : __token__
29
29
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
30
33
- name : Get Changelog Entry
31
34
if : success()
32
35
id : changelog_reader
33
36
uses : mindsers/changelog-reader-action@v2
34
37
with :
35
- version : ${{ github.ref_name }}
38
+ version : ${{ steps.normalize.outputs.version }}
36
39
path : ./docs/changelog.md
37
40
- name : Release to GitHub
38
41
if : success()
39
42
uses : ncipollo/release-action@v1
40
43
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 }}
43
46
body : ${{ steps.changelog_reader.outputs.changes }}
44
47
artifacts : dist/**
45
48
prerelease : ${{ steps.changelog_reader.outputs.status == 'prereleased' }}
You can’t perform that action at this time.
0 commit comments