Skip to content

Commit 7b9e8c0

Browse files
authored
Merge pull request #22 from bakpaul/24_12_fix_action
Update action version
2 parents 54986cb + 1d45dce commit 7b9e8c0

File tree

1 file changed

+19
-5
lines changed

1 file changed

+19
-5
lines changed

.github/workflows/ci.yml

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -92,16 +92,30 @@ 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+
95109
- name: Create artifact
96-
uses: actions/upload-artifact@v2
110+
uses: actions/upload-artifact@v4.4.0
97111
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 }}
99113
path: ${{ env.WORKSPACE_INSTALL_PATH }}
100114

101115
- name: Install artifact
102-
uses: actions/download-artifact@v2
116+
uses: actions/download-artifact@v4.1.7
103117
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 }}
105119
path: ${{ env.WORKSPACE_ARTIFACT_PATH }}
106120

107121
deploy:
@@ -112,7 +126,7 @@ jobs:
112126
continue-on-error: true
113127
steps:
114128
- name: Get artifacts
115-
uses: actions/download-artifact@v2
129+
uses: actions/download-artifact@v4.1.7
116130
with:
117131
path: artifacts
118132

0 commit comments

Comments
 (0)