Skip to content

Commit 7b59adc

Browse files
authored
Merge pull request #4 from antennae/update_ci
update workflow
2 parents c1fc23c + 1658751 commit 7b59adc

File tree

1 file changed

+18
-5
lines changed

1 file changed

+18
-5
lines changed

.github/workflows/ci.yml

Lines changed: 18 additions & 5 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:
@@ -77,7 +90,7 @@ jobs:
7790
continue-on-error: true
7891
steps:
7992
- name: Get artifacts
80-
uses: actions/download-artifact@v2
93+
uses: actions/download-artifact@v4.1.7
8194
with:
8295
path: artifacts
8396

0 commit comments

Comments
 (0)