Skip to content

Commit 9d603a1

Browse files
committed
fix wheel building in gh action
1 parent f645b6f commit 9d603a1

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

.github/workflows/build-python-wheel.yml

+10-3
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,15 @@ jobs:
6666
python -m pip install --upgrade build
6767
python -m build
6868
69-
- name: Upload Dist Directory Artifact
70-
uses: actions/upload-artifact@v3
69+
- name: Sanitize Branch Name and Git Hash
70+
run: |
71+
sanitized_branch_name=$(echo "${{ env.branch_name }}" | sed 's/[^a-zA-Z0-9_]/_/g')
72+
sanitized_git_hash=$(echo "${{ env.git_hash }}" | sed 's/[^a-zA-Z0-9_]/_/g')
73+
echo "sanitized_branch_name=$sanitized_branch_name" >> $GITHUB_ENV
74+
echo "sanitized_git_hash=$sanitized_git_hash" >> $GITHUB_ENV
75+
76+
- uses: actions/upload-artifact@v3
7177
with:
72-
name: xircuits-wheel-${{ env.branch_name }}-${{ env.git_hash }}
78+
name: xircuits-wheel-${{ env.sanitized_branch_name }}-${{ env.sanitized_git_hash }}
7379
path: dist
80+
if-no-files-found: warn

0 commit comments

Comments
 (0)