Skip to content

Commit c9689d1

Browse files
committed
update workflow
1 parent c1fc23c commit c9689d1

File tree

1 file changed

+17
-4
lines changed

1 file changed

+17
-4
lines changed

.github/workflows/ci.yml

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,16 +57,29 @@ jobs:
5757
echo ${CCACHE_BASEDIR}
5858
ccache -s
5959
fi
60+
61+
- name: Sanitize artifact name
62+
id: sanitize
63+
# This step removes special characters from the artifact name to ensure compatibility with upload-artifact
64+
# Characters removed: " : < > | * ? \r \n \ /
65+
# Spaces are replaced with underscores
66+
# This sanitization prevents errors in artifact creation and retrieval
67+
shell: pwsh
68+
run: |
69+
$originalName = "ShapeMatchingPlugin_${{ steps.sofa.outputs.run_branch }}_for-SOFA-${{ steps.sofa.outputs.sofa_version }}_${{ runner.os }}"
70+
$artifact_name = $originalName -replace '[":;<>|*?\r\n\\/]', '' -replace ' ', '_'
71+
echo "artifact_name=$artifact_name" >> $env:GITHUB_OUTPUT
72+
6073
- name: Create artifact
61-
uses: actions/upload-artifact@v2
74+
uses: actions/upload-artifact@v4.4.0
6275
with:
63-
name: ShapeMatchingPlugin_${{ steps.sofa.outputs.run_branch }}_for-SOFA-${{ steps.sofa.outputs.sofa_version }}_${{ runner.os }}
76+
name: ${{ steps.sanitize.outputs.artifact_name }}
6477
path: ${{ env.WORKSPACE_INSTALL_PATH }}
6578

6679
- name: Install artifact
67-
uses: actions/download-artifact@v2
80+
uses: actions/download-artifact@v4.1.7
6881
with:
69-
name: ShapeMatchingPlugin_${{ steps.sofa.outputs.run_branch }}_for-SOFA-${{ steps.sofa.outputs.sofa_version }}_${{ runner.os }}
82+
name: ${{ steps.sanitize.outputs.artifact_name }}
7083
path: ${{ env.WORKSPACE_ARTIFACT_PATH }}
7184

7285
deploy:

0 commit comments

Comments
 (0)