Skip to content

Commit 7fc69eb

Browse files
committed
Add GitHub release creation to publish workflow
1 parent 9db151a commit 7fc69eb

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

.github/workflows/publish.yml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,18 @@ jobs:
3232
- name: Publish to PyPI
3333
uses: pypa/gh-action-pypi-publish@release/v1
3434
with:
35-
password: ${{ secrets.PYPI_TOKEN }}
35+
password: ${{ secrets.PYPI_TOKEN }}
36+
37+
- name: Extract version from pyproject.toml
38+
id: get_version
39+
run: |
40+
VERSION=$(python -c "import tomllib; print(tomllib.load(open('pyproject.toml', 'rb'))['project']['version'])")
41+
echo "VERSION=$VERSION" >> $GITHUB_OUTPUT
42+
43+
- name: Create GitHub Release
44+
env:
45+
GH_TOKEN: ${{ github.token }}
46+
run: |
47+
gh release create "v${{ steps.get_version.outputs.VERSION }}" \
48+
--title "v${{ steps.get_version.outputs.VERSION }}" \
49+
--generate-notes

0 commit comments

Comments
 (0)