Skip to content

Commit fcce5fa

Browse files
authored
Update action versions (#10)
1 parent 62c77d7 commit fcce5fa

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
@@ -68,16 +68,29 @@ jobs:
6868
echo ${CCACHE_BASEDIR}
6969
ccache -s
7070
fi
71+
72+
- name: Sanitize artifact name
73+
id: sanitize
74+
# This step removes special characters from the artifact name to ensure compatibility with upload-artifact
75+
# Characters removed: " : < > | * ? \r \n \ /
76+
# Spaces are replaced with underscores
77+
# This sanitization prevents errors in artifact creation and retrieval
78+
shell: pwsh
79+
run: |
80+
$originalName = "PluginExample_${{ steps.sofa.outputs.run_branch }}_for-SOFA-${{ steps.sofa.outputs.sofa_version }}_${{ runner.os }}"
81+
$artifact_name = $originalName -replace '[":;<>|*?\r\n\\/]', '' -replace ' ', '_'
82+
echo "artifact_name=$artifact_name" >> $env:GITHUB_OUTPUT
83+
7184
- name: Create artifact
72-
uses: actions/upload-artifact@v2
85+
uses: actions/upload-artifact@v4.4.0
7386
with:
74-
name: PluginExample_${{ steps.sofa.outputs.run_branch }}_for-SOFA-${{ steps.sofa.outputs.sofa_version }}_${{ runner.os }}
87+
name: ${{ steps.sanitize.outputs.artifact_name }}
7588
path: ${{ env.WORKSPACE_INSTALL_PATH }}
7689

7790
- name: Install artifact
78-
uses: actions/download-artifact@v2
91+
uses: actions/download-artifact@v4.1.7
7992
with:
80-
name: PluginExample_${{ steps.sofa.outputs.run_branch }}_for-SOFA-${{ steps.sofa.outputs.sofa_version }}_${{ runner.os }}
93+
name: ${{ steps.sanitize.outputs.artifact_name }}
8194
path: ${{ env.WORKSPACE_ARTIFACT_PATH }}
8295

8396
- name: Set env vars for tests
@@ -121,7 +134,7 @@ jobs:
121134
continue-on-error: true
122135
steps:
123136
- name: Get artifacts
124-
uses: actions/download-artifact@v2
137+
uses: actions/download-artifact@v4.1.7
125138
with:
126139
path: artifacts
127140

0 commit comments

Comments
 (0)