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"