Skip to content

Commit fc619a5

Browse files
authored
Update publish-to-pypi.yml
1 parent 4173fe0 commit fc619a5

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

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

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ jobs:
1313
permissions:
1414
contents: write
1515
id-token: write
16+
outputs:
17+
MPYTHON_VERSION: ${{ steps.getversion.outputs.MPYTHON_VERSION }}
1618
steps:
1719
- name: Check out package
1820
uses: actions/checkout@v4
@@ -26,6 +28,7 @@ jobs:
2628
echo "Creating tag $VERSION with message:"
2729
echo "$MSG"
2830
git tag -a "$VERSION" -m "$MSG"
31+
echo "MPYTHON_VERSION=$VERSION" >> "$GITHUB_OUTPUT"
2932
- name: Publish tags
3033
run: git push --tags
3134

@@ -83,6 +86,7 @@ jobs:
8386
and upload it to GitHub Release
8487
needs:
8588
- publish-to-pypi
89+
- create-tag
8690
runs-on: ubuntu-latest
8791

8892
permissions:
@@ -106,7 +110,7 @@ jobs:
106110
GITHUB_TOKEN: ${{ github.token }}
107111
run: |
108112
gh release create
109-
"$GITHUB_REF_NAME"
113+
"${{ needs.create-tag.outputs.MPYTHON_VERSION }}"
110114
--repo "$GITHUB_REPOSITORY"
111115
--notes ""
112116
- name: Upload artifact signatures to GitHub Release
@@ -117,7 +121,7 @@ jobs:
117121
# sigstore-produced signatures and certificates.
118122
run: |
119123
gh release upload
120-
"$GITHUB_REF_NAME" dist/**
124+
"${{ needs.create-tag.outputs.MPYTHON_VERSION }}" dist/**
121125
--repo "$GITHUB_REPOSITORY"
122126
123127
publish-to-testpypi:

0 commit comments

Comments
 (0)