Skip to content

Commit d5d5272

Browse files
committed
Binary distribution test
1 parent d660c21 commit d5d5272

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

.github/workflows/python-publish.yml

+7-3
Original file line numberDiff line numberDiff line change
@@ -68,13 +68,17 @@ jobs:
6868
with:
6969
name: dist
7070

71-
# Step 8: Publish release
71+
# Step 8: Get short commit SHA (first 7 characters)
72+
- name: Get short commit SHA
73+
run: echo "COMMIT_HASH=$(echo ${GITHUB_SHA} | cut -c1-7)" >> $GITHUB_ENV
74+
75+
# Step 9: Publish release
7276
- name: Publish release
7377
uses: ncipollo/release-action@v1
7478
with:
7579
artifacts: 'dist/*'
7680
token: ${{ secrets.GITHUB_TOKEN }} # Automatically available GitHub token
77-
tag: ${{ github.sha.slice(0, 7) }} # Use the first 7 characters of the commit hash as the tag
78-
name: Release ${{ github.event.head_commit.message }} # Optional: Customize release name
81+
tag: ${{ env.COMMIT_HASH }} # Use the shortened commit hash
82+
name: Release ${{ github.event.head_commit.message }} # Optional: Use commit message as the release name
7983
draft: false
8084
prerelease: false

0 commit comments

Comments
 (0)