|
12 | 12 | strategy: |
13 | 13 | fail-fast: false |
14 | 14 | matrix: |
15 | | - os: [ubuntu-22.04, macos-13, windows-2022] |
| 15 | + os: [ubuntu-22.04, macos-14, windows-2022] |
16 | 16 | sofa_branch: [master] |
17 | 17 |
|
18 | 18 | steps: |
@@ -69,18 +69,31 @@ jobs: |
69 | 69 | echo ${CCACHE_BASEDIR} |
70 | 70 | ccache -s |
71 | 71 | 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 | +
|
72 | 85 | - name: Create artifact |
73 | 86 | id: create-artifact |
74 | | - uses: actions/upload-artifact@v2 |
| 87 | + uses: actions/upload-artifact@v4.4.0 |
75 | 88 | 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 }} |
77 | 90 | path: ${{ env.WORKSPACE_INSTALL_PATH }} |
78 | 91 |
|
79 | 92 | - name: Install artifact |
80 | 93 | id: install-artifact |
81 | | - uses: actions/download-artifact@v2 |
| 94 | + uses: actions/download-artifact@v4.1.7 |
82 | 95 | 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 }} |
84 | 97 | path: ${{ env.WORKSPACE_ARTIFACT_PATH }} |
85 | 98 |
|
86 | 99 | - name: Set env vars for tests |
@@ -151,7 +164,7 @@ jobs: |
151 | 164 | continue-on-error: true |
152 | 165 | steps: |
153 | 166 | - name: Get artifacts |
154 | | - uses: actions/download-artifact@v2 |
| 167 | + uses: actions/download-artifact@v4.1.7 |
155 | 168 | with: |
156 | 169 | path: artifacts |
157 | 170 |
|
|
0 commit comments