diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 31cf752f..38607816 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -19,22 +19,20 @@ jobs: with: node-version: 20.18.0 - - name: Push build to R2 + - name: Configure AWS CLI for R2 env: R2_ACCESS_KEY_ID: ${{ secrets.R2_ACCESS_KEY_ID }} R2_SECRET_ACCESS_KEY: ${{ secrets.R2_SECRET_ACCESS_KEY }} - S3_ENDPOINT: ${{ secrets.S3_ENDPOINT }} run: | aws configure set aws_access_key_id "$R2_ACCESS_KEY_ID" aws configure set aws_secret_access_key "$R2_SECRET_ACCESS_KEY" aws configure set default.region us-east-1 - aws s3 cp ./docs s3://${{ vars.BUILDS_BUCKET_NAME }}/$GITHUB_SHA --exclude "*" --include "*-portable.exe" --include "*.png" --endpoint-url $S3_ENDPOINT --expires "$(date -d "7 days" --utc +'%Y-%m-%dT%H:%M:%SZ')" - for file in ./dist/*.exe ./docs/*.png; do - if [[ -e "$file" ]]; then - echo "https://artifacts.hydralauncher.gg/$GITHUB_SHA/$(basename $file)" - fi - done - shell: bash + + - name: Push build to R2 + env: + S3_ENDPOINT: ${{ secrets.S3_ENDPOINT }} + run: | + aws s3 cp ./docs s3://${{ vars.BUILDS_BUCKET_NAME }}/$GITHUB_SHA --recursive --exclude "*" --include "*.png" --include ".deb" --endpoint-url $S3_ENDPOINT --expires "$(date -d "7 days" --utc +'%Y-%m-%dT%H:%M:%SZ')" - name: Install dependencies run: yarn @@ -74,3 +72,18 @@ jobs: MAIN_VITE_ANALYTICS_API_URL: ${{ vars.MAIN_VITE_ANALYTICS_API_URL }} RENDERER_VITE_INTERCOM_APP_ID: ${{ vars.RENDERER_VITE_INTERCOM_APP_ID }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Create artifact + uses: actions/upload-artifact@v4 + with: + name: Build-${{ matrix.os }} + path: | + dist/*-portable.exe + dist/*.zip + dist/*.dmg + dist/*.deb + dist/*.rpm + dist/*.tar.gz + dist/*.yml + dist/*.blockmap + dist/*.pacman