Skip to content

Commit fa7aacc

Browse files
authored
Update publish-to-pypi.yml
1 parent d9e9dd9 commit fa7aacc

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

.github/workflows/publish-to-pypi.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ jobs:
5959
publish-to-pypi:
6060
name: >-
6161
Publish Package to PyPI
62-
if: startsWith(github.ref, 'refs/tags/') # only publish to PyPI on tag pushes
6362
needs:
6463
- build
6564
runs-on: ubuntu-latest
@@ -105,9 +104,10 @@ jobs:
105104
- name: Create GitHub Release
106105
env:
107106
GITHUB_TOKEN: ${{ github.token }}
108-
run: >-
107+
run: |
108+
VERSION=$(sed -n 's/^version = "\(.*\)"/\1/p' pyproject.toml)
109109
gh release create
110-
"$GITHUB_REF_NAME"
110+
"$VERSION"
111111
--repo "$GITHUB_REPOSITORY"
112112
--notes ""
113113
- name: Upload artifact signatures to GitHub Release
@@ -116,7 +116,8 @@ jobs:
116116
# Upload to GitHub Release using the `gh` CLI.
117117
# `dist/` contains the built packages, and the
118118
# sigstore-produced signatures and certificates.
119-
run: >-
119+
run: |
120+
VERSION=$(sed -n 's/^version = "\(.*\)"/\1/p' pyproject.toml)
120121
gh release upload
121122
"$GITHUB_REF_NAME" dist/**
122123
--repo "$GITHUB_REPOSITORY"

0 commit comments

Comments
 (0)