diff --git a/.github/workflows/build_prepare.yaml b/.github/workflows/build_prepare.yaml index 7ce54bb..9c128e5 100644 --- a/.github/workflows/build_prepare.yaml +++ b/.github/workflows/build_prepare.yaml @@ -69,14 +69,23 @@ jobs: env: S3_AK: ${{ secrets.S3_AK }} S3_SK: ${{ secrets.S3_SK }} + shell: bash run: | + # Download MinIO client wget https://dl.min.io/client/mc/release/linux-amd64/mc chmod +x mc - ./mc alias set s3 https://s3.piskot.si $S3_AK $S3_SK + + # Verify environment variables + if [ -z "$S3_AK" ] || [ -z "$S3_SK" ]; then + echo "Error: S3 credentials not set" + exit 1 + fi - - name: Upload files to S3 - run: | - ./mc cp webapp.asar s3/element-desktop/staging/ - ./mc cp package.json s3/element-desktop/staging/ - ./mc cp electronVersion s3/element-desktop/staging/ - ./mc cp hakHash s3/element-desktop/staging/ + # Set and verify alias + ./mc alias set s3 https://s3.piskot.si "$S3_AK" "$S3_SK" + if ! ./mc alias list | grep -q "s3"; then + echo "Error: Failed to set S3 alias" + exit 1 + fi + + echo "Successfully configured MinIO client"