From 5b244e8b68f132b2cc251448f454ac36f9a03ef2 Mon Sep 17 00:00:00 2001 From: Matt McCormick Date: Sun, 14 Apr 2024 14:42:13 -0400 Subject: [PATCH] Fix OS archive command --- .github/workflows/ci.yml | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 68ba490..47480c4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -42,18 +42,22 @@ jobs: cd build/castxml-prefix/src/castxml-build ctest --output-on-failure - - name: Archive + - name: Create archive for Windows + if: matrix.os == 'windows-2022' shell: cmd run: | cd build - if [[ "${{ runner.os }}" == "Windows" ]]; then - 7z a castxml-windows.zip castxml - mv castxml-windows.zip .. - else - tar cvf castxml-${{ matrix.os }}.tar castxml - gzip -9 castxml-${{ matrix.os }}.tar - mv castxml-${{ matrix.os }}.tar.gz .. - fi + 7z a castxml-windows.zip castxml + move castxml-windows.zip .. + + - name: Create archive for macOS and Ubuntu + if: matrix.os != 'windows-2022' + shell: bash + run: | + cd build + tar cvf castxml-${{ matrix.os }}.tar castxml + gzip -9 castxml-${{ matrix.os }}.tar + mv castxml-${{ matrix.os }}.tar.gz .. - name: Upload artifact uses: actions/upload-artifact@v4