From a1fc452cccfc53ba71403973d33a0e9dfc2f3c72 Mon Sep 17 00:00:00 2001 From: Lilith River Date: Tue, 21 Jan 2025 23:06:24 -0700 Subject: [PATCH] ci: fix create zip/tar script syntax --- .github/workflows/ci.yml | 34 ++++++++++++++++++---------------- 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 96394bcf..028888ae 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -369,22 +369,24 @@ jobs: echo "${{ env.TEMP_STATIC_LIB }} exists" tar czf "${{ env.TEMP_STATIC_ARCHIVE }}" "${{ env.TEMP_STATIC_LIB }}" - UPLOAD_DIR="./artifacts/upload - env STATIC_ARCHIVE_1 = "/static/${{ matrix.target }}/latest/${{ env.LIBIMAGEFLOW_STATIC }}.${{ env.EXTENSION }}" - env STATIC_ARCHIVE_2 = "/static/${{ matrix.target }}/releases/${{ github.ref_name }}/${{ env.LIBIMAGEFLOW_STATIC }}.${{ env.EXTENSION }}" - env STATIC_ARCHIVE_3 = "/static/${{ matrix.target }}/commits/${{ github.sha }}/${{ matrix.commit-suffix }}.${{ env.EXTENSION }}" - env STATIC_ARCHIVE_GITHUB = "./artifacts/github/lib${{ env.IMAGEFLOW_TAG_SHA_SUFFIX }}-${{ matrix.commit-suffix }}.${{ env.LIBIMAGEFLOW_STATIC }}.${{ env.EXTENSION }}" - - mkdir -p $(dirname $STATIC_UPLOAD_DIR$STATIC_ARCHIVE_1) - mkdir -p $(dirname $STATIC_UPLOAD_DIR$STATIC_ARCHIVE_2) - mkdir -p $(dirname $STATIC_UPLOAD_DIR$STATIC_ARCHIVE_3) - cp $TEMP_STATIC_ARCHIVE $STATIC_UPLOAD_DIR$STATIC_ARCHIVE_1 - cp $TEMP_STATIC_ARCHIVE $STATIC_UPLOAD_DIR$STATIC_ARCHIVE_2 - cp $TEMP_STATIC_ARCHIVE $STATIC_UPLOAD_DIR$STATIC_ARCHIVE_3 - mv $TEMP_STATIC_ARCHIVE $STATIC_ARCHIVE_GITHUB - echo "Uploaded static archive to ${{ env.HTTPS_IMAGEFLOW_NIGHTLIES }}$STATIC_UPLOAD_DIR$STATIC_ARCHIVE_1" - echo "Uploaded static archive to ${{ env.HTTPS_IMAGEFLOW_NIGHTLIES }}$STATIC_UPLOAD_DIR$STATIC_ARCHIVE_2" - echo "Uploaded static archive to ${{ env.HTTPS_IMAGEFLOW_NIGHTLIES }}$STATIC_UPLOAD_DIR$STATIC_ARCHIVE_3" + # Fix: Correct variable assignments and directory creation + UPLOAD_DIR="./artifacts/upload" + STATIC_ARCHIVE_1="/static/${{ matrix.target }}/latest/${{ env.LIBIMAGEFLOW_STATIC }}.${{ env.EXTENSION }}" + STATIC_ARCHIVE_2="/static/${{ matrix.target }}/releases/${{ github.ref_name }}/${{ env.LIBIMAGEFLOW_STATIC }}.${{ env.EXTENSION }}" + STATIC_ARCHIVE_3="/static/${{ matrix.target }}/commits/${{ github.sha }}/${{ matrix.commit-suffix }}.${{ env.EXTENSION }}" + STATIC_ARCHIVE_GITHUB="./artifacts/github/lib${{ env.IMAGEFLOW_TAG_SHA_SUFFIX }}-${{ matrix.commit-suffix }}.${{ env.LIBIMAGEFLOW_STATIC }}.${{ env.EXTENSION }}" + + mkdir -p "$(dirname "$UPLOAD_DIR$STATIC_ARCHIVE_1")" + mkdir -p "$(dirname "$UPLOAD_DIR$STATIC_ARCHIVE_2")" + mkdir -p "$(dirname "$UPLOAD_DIR$STATIC_ARCHIVE_3")" + cp "${{ env.TEMP_STATIC_ARCHIVE }}" "$UPLOAD_DIR$STATIC_ARCHIVE_1" + cp "${{ env.TEMP_STATIC_ARCHIVE }}" "$UPLOAD_DIR$STATIC_ARCHIVE_2" + cp "${{ env.TEMP_STATIC_ARCHIVE }}" "$UPLOAD_DIR$STATIC_ARCHIVE_3" + mv "${{ env.TEMP_STATIC_ARCHIVE }}" "$STATIC_ARCHIVE_GITHUB" + + echo "Uploaded static archive to ${{ env.HTTPS_IMAGEFLOW_NIGHTLIES }}$STATIC_ARCHIVE_1" + echo "Uploaded static archive to ${{ env.HTTPS_IMAGEFLOW_NIGHTLIES }}$STATIC_ARCHIVE_2" + echo "Uploaded static archive to ${{ env.HTTPS_IMAGEFLOW_NIGHTLIES }}$STATIC_ARCHIVE_3" echo "RELATIVE_GITHUB_ARCHIVE_STATIC=$STATIC_ARCHIVE_GITHUB" >> $GITHUB_ENV ) else