From aa5618fbddf7c3e33f059fb6a36acbf4b389ffb9 Mon Sep 17 00:00:00 2001 From: AlessandriniAntoine Date: Thu, 12 Sep 2024 16:22:48 +0200 Subject: [PATCH 1/2] CI artifact version update --- .github/workflows/ci.yml | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0dd14d1..821eeed 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -66,10 +66,22 @@ jobs: ccache -s fi + - name: Sanitize artifact name + id: sanitize + # This step removes special characters from the artifact name to ensure compatibility with upload-artifact + # Characters removed: " : < > | * ? \r \n \ / + # Spaces are replaced with underscores + # This sanitization prevents errors in artifact creation and retrieval + shell: pwsh + run: | + $originalName = "Cosserat_${{ steps.sofa.outputs.run_branch }}_for-SOFA-${{ steps.sofa.outputs.sofa_version }}_${{ runner.os }}" + $artifact_name = $originalName -replace '[":;<>|*?\r\n\\/]', '' -replace ' ', '_' + echo "artifact_name=$artifact_name" >> $env:GITHUB_OUTPUT + - name: Create artifact - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4.4.0 with: - name: STLIB_${{ steps.sofa.outputs.run_branch }}_for-SOFA-${{ steps.sofa.outputs.sofa_version }}_${{ runner.os }} + name: ${{ steps.sanitize.outputs.artifact_name }} path: ${{ env.WORKSPACE_INSTALL_PATH }} deploy: From 3965af699a6cbd6460b698639af53e816bebe6b1 Mon Sep 17 00:00:00 2001 From: AlessandriniAntoine Date: Thu, 12 Sep 2024 16:22:48 +0200 Subject: [PATCH 2/2] CI artifact version update --- .github/workflows/ci.yml | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0dd14d1..7f408eb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -66,10 +66,22 @@ jobs: ccache -s fi + - name: Sanitize artifact name + id: sanitize + # This step removes special characters from the artifact name to ensure compatibility with upload-artifact + # Characters removed: " : < > | * ? \r \n \ / + # Spaces are replaced with underscores + # This sanitization prevents errors in artifact creation and retrieval + shell: pwsh + run: | + $originalName = "STLIB_${{ steps.sofa.outputs.run_branch }}_for-SOFA-${{ steps.sofa.outputs.sofa_version }}_${{ runner.os }}" + $artifact_name = $originalName -replace '[":;<>|*?\r\n\\/]', '' -replace ' ', '_' + echo "artifact_name=$artifact_name" >> $env:GITHUB_OUTPUT + - name: Create artifact - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4.4.0 with: - name: STLIB_${{ steps.sofa.outputs.run_branch }}_for-SOFA-${{ steps.sofa.outputs.sofa_version }}_${{ runner.os }} + name: ${{ steps.sanitize.outputs.artifact_name }} path: ${{ env.WORKSPACE_INSTALL_PATH }} deploy: