1212 strategy :
1313 fail-fast : false
1414 matrix :
15- os : [ubuntu-22.04, macos-13 , windows-2022]
15+ os : [ubuntu-22.04, macos-14 , windows-2022]
1616 sofa_branch : [master]
1717
1818 steps :
@@ -69,18 +69,31 @@ jobs:
6969 echo ${CCACHE_BASEDIR}
7070 ccache -s
7171 fi
72+
73+ - name : Sanitize artifact name
74+ id : sanitize
75+ # This step removes special characters from the artifact name to ensure compatibility with upload-artifact
76+ # Characters removed: " : < > | * ? \r \n \ /
77+ # Spaces are replaced with underscores
78+ # This sanitization prevents errors in artifact creation and retrieval
79+ shell : pwsh
80+ run : |
81+ $originalName = "PluginExample_${{ steps.sofa.outputs.run_branch }}_for-SOFA-${{ steps.sofa.outputs.sofa_version }}_${{ runner.os }}"
82+ $artifact_name = $originalName -replace '[":;<>|*?\r\n\\/]', '' -replace ' ', '_'
83+ echo "artifact_name=$artifact_name" >> $env:GITHUB_OUTPUT
84+
7285 - name : Create artifact
7386 id : create-artifact
74- uses : actions/upload-artifact@v2
87+ uses : actions/upload-artifact@v4.4.0
7588 with :
76- name : PluginExample_ ${{ steps.sofa .outputs.run_branch }}_for-SOFA-${{ steps.sofa.outputs.sofa_version }}_${{ runner.os }}
89+ name : ${{ steps.sanitize .outputs.artifact_name }}
7790 path : ${{ env.WORKSPACE_INSTALL_PATH }}
7891
7992 - name : Install artifact
8093 id : install-artifact
81- uses : actions/download-artifact@v2
94+ uses : actions/download-artifact@v4.1.7
8295 with :
83- name : PluginExample_ ${{ steps.sofa .outputs.run_branch }}_for-SOFA-${{ steps.sofa.outputs.sofa_version }}_${{ runner.os }}
96+ name : ${{ steps.sanitize .outputs.artifact_name }}
8497 path : ${{ env.WORKSPACE_ARTIFACT_PATH }}
8598
8699 - name : Set env vars for tests
@@ -131,6 +144,7 @@ jobs:
131144
132145 binary_status=$([ '${{ steps.create-artifact.outcome }}' == 'success' ] && \
133146 [ '${{ steps.install-artifact.outcome }}' == 'success' ] && \
147+ [ '${{ steps.sanitize.outcome }}' == 'success' ] && \
134148 echo 'true' || echo 'false')
135149
136150
@@ -151,7 +165,7 @@ jobs:
151165 continue-on-error : true
152166 steps :
153167 - name : Get artifacts
154- uses : actions/download-artifact@v2
168+ uses : actions/download-artifact@v4.1.7
155169 with :
156170 path : artifacts
157171
0 commit comments