@@ -92,16 +92,30 @@ jobs:
92
92
echo ${CCACHE_BASEDIR}
93
93
ccache -s
94
94
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
+
95
109
- name : Create artifact
96
- uses : actions/upload-artifact@v2
110
+ uses : actions/upload-artifact@v4.4.0
97
111
with :
98
- name : CGALPlugin_ ${{ steps.sofa .outputs.run_branch }}_for-SOFA-${{ steps.sofa.outputs.sofa_version }}_${{ runner.os }}
112
+ name : ${{ steps.sanitize .outputs.artifact_name }}
99
113
path : ${{ env.WORKSPACE_INSTALL_PATH }}
100
114
101
115
- name : Install artifact
102
- uses : actions/download-artifact@v2
116
+ uses : actions/download-artifact@v4.1.7
103
117
with :
104
- name : CGALPlugin_ ${{ steps.sofa .outputs.run_branch }}_for-SOFA-${{ steps.sofa.outputs.sofa_version }}_${{ runner.os }}
118
+ name : ${{ steps.sanitize .outputs.artifact_name }}
105
119
path : ${{ env.WORKSPACE_ARTIFACT_PATH }}
106
120
107
121
deploy :
@@ -112,7 +126,7 @@ jobs:
112
126
continue-on-error : true
113
127
steps :
114
128
- name : Get artifacts
115
- uses : actions/download-artifact@v2
129
+ uses : actions/download-artifact@v4.1.7
116
130
with :
117
131
path : artifacts
118
132
0 commit comments