From 4ef1d0ac5ff26040c9cac89a5b294bf5b9c6e3ea Mon Sep 17 00:00:00 2001 From: Alex Florenti Date: Mon, 5 Aug 2024 11:14:35 +0200 Subject: [PATCH] test update build.yml --- .github/workflows/build.yml | 6 +++++- build-scripts/upload.sh | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100755 build-scripts/upload.sh diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3c2c0c0..f8b34a6 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -27,6 +27,10 @@ jobs: id: build_backend if: ${{ success() }} - name: Upload artifacts + env: + UPLOAD_KEY: ${{ secrets.UPLOAD_KEY }} + UPLOAD_URL: ${{ env.UPLOAD_URL }} + BRANCH: ${{ env.branch }} id: upload if: ${{ success() }} - run: export UPLOAD_KEY='${{ secrets.UPLOAD_KEY }}'; cd dist && find * -type f -exec echo 'Uploading @{}' \; -exec curl -4 -F 'file=@{}' -F "path=$branch/{}" -F "key=$UPLOAD_KEY" "${{ vars.UPLOAD_URL }}" \;; + run: ./build-scripts/upload.sh diff --git a/build-scripts/upload.sh b/build-scripts/upload.sh new file mode 100755 index 0000000..fa40597 --- /dev/null +++ b/build-scripts/upload.sh @@ -0,0 +1 @@ +cd dist && find * -type f -exec echo 'Uploading @{}' \; -exec curl -4 -F 'file=@{}' -F "path=$BRANCH/{}" -F "key=$UPLOAD_KEY" "$UPLOAD_URL"