Skip to content

Commit 454a4eb

Browse files
authored
Update publish-to-pypi.yml
1 parent c3aae5d commit 454a4eb

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

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

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ jobs:
2626
echo "Creating tag $VERSION with message:"
2727
echo "$MSG"
2828
git tag -a "$VERSION" -m "$MSG"
29+
echo "MPYTHON_VERSION=$VERSION" >> $GITHUB_ENV
2930
- name: Publish tags
3031
run: git push --tags
3132

@@ -105,9 +106,8 @@ jobs:
105106
env:
106107
GITHUB_TOKEN: ${{ github.token }}
107108
run: |
108-
VERSION=$(sed -n 's/^version = "\(.*\)"/\1/p' pyproject.toml)
109109
gh release create
110-
"$VERSION"
110+
"${{ env.MPYTHON_VERSION }}"
111111
--repo "$GITHUB_REPOSITORY"
112112
--notes ""
113113
- name: Upload artifact signatures to GitHub Release
@@ -117,9 +117,8 @@ jobs:
117117
# `dist/` contains the built packages, and the
118118
# sigstore-produced signatures and certificates.
119119
run: |
120-
VERSION=$(sed -n 's/^version = "\(.*\)"/\1/p' pyproject.toml)
121120
gh release upload
122-
"$GITHUB_REF_NAME" dist/**
121+
"${{ env.MPYTHON_VERSION }}" dist/**
123122
--repo "$GITHUB_REPOSITORY"
124123
125124
publish-to-testpypi:

0 commit comments

Comments
 (0)