Skip to content

Commit 59a639d

Browse files
Update ci.yml
1 parent 77cb8d0 commit 59a639d

File tree

1 file changed

+17
-2
lines changed

1 file changed

+17
-2
lines changed

.github/workflows/ci.yml

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,14 +92,29 @@ jobs:
9292
echo ${CCACHE_BASEDIR}
9393
ccache -s
9494
fi
95+
96+
97+
- name: Sanitize artifact name
98+
id: sanitize
99+
# This step removes special characters from the artifact name to ensure compatibility with upload-artifact
100+
# Characters removed: " : < > | * ? \r \n \ /
101+
# Spaces are replaced with underscores
102+
# This sanitization prevents errors in artifact creation and retrieval
103+
shell: pwsh
104+
run: |
105+
$originalName = "CGALPlugin_${{ steps.sofa.outputs.run_branch }}_for-SOFA-${{ steps.sofa.outputs.sofa_version }}_${{ runner.os }}"
106+
$artifact_name = $originalName -replace '[":;<>|*?\r\n\\/]', '' -replace ' ', '_'
107+
echo "artifact_name=$artifact_name" >> $env:GITHUB_OUTPUT
108+
109+
95110
- name: Create artifact
96-
uses: actions/upload-artifact@v2
111+
uses: actions/upload-artifact@v4.4.0
97112
with:
98113
name: CGALPlugin_${{ steps.sofa.outputs.run_branch }}_for-SOFA-${{ steps.sofa.outputs.sofa_version }}_${{ runner.os }}
99114
path: ${{ env.WORKSPACE_INSTALL_PATH }}
100115

101116
- name: Install artifact
102-
uses: actions/download-artifact@v2
117+
uses: actions/download-artifact@v4.1.7
103118
with:
104119
name: CGALPlugin_${{ steps.sofa.outputs.run_branch }}_for-SOFA-${{ steps.sofa.outputs.sofa_version }}_${{ runner.os }}
105120
path: ${{ env.WORKSPACE_ARTIFACT_PATH }}

0 commit comments

Comments
 (0)