From 669b866fa389a8043b5918ee2eae5fcbd3fec50d Mon Sep 17 00:00:00 2001 From: andres-spacemesh <106999199+andres-spacemesh@users.noreply.github.com> Date: Wed, 17 Jul 2024 13:20:08 -0700 Subject: [PATCH 01/10] Add upload to R2 to pr-build workflow --- .github/workflows/pr-build.yml | 51 ++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) diff --git a/.github/workflows/pr-build.yml b/.github/workflows/pr-build.yml index 1b94618ff..9c0fb36da 100644 --- a/.github/workflows/pr-build.yml +++ b/.github/workflows/pr-build.yml @@ -266,6 +266,57 @@ jobs: path: ./release/Spacemesh-${{ steps.package-version.outputs.version }}${{ env.arch }}.AppImage destination: ${{ secrets.GCP_BUCKET }}/pr-${{ github.sha }} + # Upload artifacts to Cloudflare + - if: matrix.platform == 'macos' + name: Upload macos build to R2 + uses: shallwefootball/s3-upload-action@master + env: + preSuffix: ${{ matrix.arch != '' && '-' || '' }} + with: + aws_key_id: ${{ secrets.CLOUDFLARE_ACCESS_KEY_ID }} + aws_secret_access_key: ${{ secrets.CLOUDFLARE_SECRET_ACCESS_KEY}} + aws_bucket: ${{ secrets.CLOUDFLARE_BUCKET }} + source_dir: ./release/Spacemesh-${{ steps.package-version.outputs.version }}${{ env.preSuffix }}${{ matrix.arch }}.dmg + destination_dir: dist/pr-${{ github.sha }} + endpoint: https://${{ secrets.CLOUDFLARE_ACCOUNT_ID }}.r2.cloudflarestorage.com + + - if: matrix.platform == 'windows' + name: Upload windows build to R2 + uses: shallwefootball/s3-upload-action@master + with: + aws_key_id: ${{ secrets.CLOUDFLARE_ACCESS_KEY_ID }} + aws_secret_access_key: ${{ secrets.CLOUDFLARE_SECRET_ACCESS_KEY}} + aws_bucket: ${{ secrets.CLOUDFLARE_BUCKET }} + source_dir: ./release/Spacemesh Setup ${{ steps.package-version.outputs.version }}.exe + destination_dir: dist/pr-${{ github.sha }} + endpoint: https://${{ secrets.CLOUDFLARE_ACCOUNT_ID }}.r2.cloudflarestorage.com + + - if: matrix.platform == 'linux' + name: Upload linux build to R2 + uses: shallwefootball/s3-upload-action@master + env: + preSuffix: ${{ matrix.arch != '' && '_' || '' }} + with: + aws_key_id: ${{ secrets.CLOUDFLARE_ACCESS_KEY_ID }} + aws_secret_access_key: ${{ secrets.CLOUDFLARE_SECRET_ACCESS_KEY}} + aws_bucket: ${{ secrets.CLOUDFLARE_BUCKET }} + source_dir: ./release/spacemesh_app_${{ steps.package-version.outputs.version }}${{ env.preSuffix }}${{ matrix.arch }}.deb + destination_dir: dist/pr-${{ github.sha }} + endpoint: https://${{ secrets.CLOUDFLARE_ACCOUNT_ID }}.r2.cloudflarestorage.com + + - if: matrix.platform == 'linux' + name: Upload linux build to R2 + uses: shallwefootball/s3-upload-action@master + env: + arch: ${{ matrix.arch == 'arm64' && '-arm64' || '' }} + with: + aws_key_id: ${{ secrets.CLOUDFLARE_ACCESS_KEY_ID }} + aws_secret_access_key: ${{ secrets.CLOUDFLARE_SECRET_ACCESS_KEY}} + aws_bucket: ${{ secrets.CLOUDFLARE_BUCKET }} + source_dir: ./release/Spacemesh-${{ steps.package-version.outputs.version }}${{ env.arch }}.AppImage + destination_dir: dist/pr-${{ github.sha }} + endpoint: https://${{ secrets.CLOUDFLARE_ACCOUNT_ID }}.r2.cloudflarestorage.com + post-links: runs-on: ubuntu-latest needs: build-and-upload From efc3d2ddff054eca3d489a331513a150a0434312 Mon Sep 17 00:00:00 2001 From: andres-spacemesh <106999199+andres-spacemesh@users.noreply.github.com> Date: Wed, 17 Jul 2024 14:08:22 -0700 Subject: [PATCH 02/10] Change upload action --- .github/workflows/pr-build.yml | 70 +++++++++++++++++----------------- 1 file changed, 36 insertions(+), 34 deletions(-) diff --git a/.github/workflows/pr-build.yml b/.github/workflows/pr-build.yml index 9c0fb36da..fe9571914 100644 --- a/.github/workflows/pr-build.yml +++ b/.github/workflows/pr-build.yml @@ -269,53 +269,55 @@ jobs: # Upload artifacts to Cloudflare - if: matrix.platform == 'macos' name: Upload macos build to R2 - uses: shallwefootball/s3-upload-action@master - env: - preSuffix: ${{ matrix.arch != '' && '-' || '' }} + uses: jakejarvis/s3-sync-action@master with: - aws_key_id: ${{ secrets.CLOUDFLARE_ACCESS_KEY_ID }} - aws_secret_access_key: ${{ secrets.CLOUDFLARE_SECRET_ACCESS_KEY}} - aws_bucket: ${{ secrets.CLOUDFLARE_BUCKET }} - source_dir: ./release/Spacemesh-${{ steps.package-version.outputs.version }}${{ env.preSuffix }}${{ matrix.arch }}.dmg - destination_dir: dist/pr-${{ github.sha }} - endpoint: https://${{ secrets.CLOUDFLARE_ACCOUNT_ID }}.r2.cloudflarestorage.com + args: --acl public-read --follow-symlinks --delete + env: + AWS_S3_BUCKET: ${{ secrets.CLOUDFLARE_BUCKET }} + AWS_ACCESS_KEY_ID: ${{ secrets.CLOUDFLARE_ACCESS_KEY_ID }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.CLOUDFLARE_SECRET_ACCESS_KEY }} + SOURCE_DIR: ./release/Spacemesh-${{ steps.package-version.outputs.version }}${{ matrix.arch != '' && '-' || '' }}${{ matrix.arch }}.dmg + DEST_DIR: 'dist/pr-${{ github.sha }}' + AWS_S3_ENDPOINT: https://${{ secrets.CLOUDFLARE_ACCOUNT_ID }}.r2.cloudflarestorage.com - if: matrix.platform == 'windows' name: Upload windows build to R2 - uses: shallwefootball/s3-upload-action@master + uses: jakejarvis/s3-sync-action@master with: - aws_key_id: ${{ secrets.CLOUDFLARE_ACCESS_KEY_ID }} - aws_secret_access_key: ${{ secrets.CLOUDFLARE_SECRET_ACCESS_KEY}} - aws_bucket: ${{ secrets.CLOUDFLARE_BUCKET }} - source_dir: ./release/Spacemesh Setup ${{ steps.package-version.outputs.version }}.exe - destination_dir: dist/pr-${{ github.sha }} - endpoint: https://${{ secrets.CLOUDFLARE_ACCOUNT_ID }}.r2.cloudflarestorage.com + args: --acl public-read --follow-symlinks --delete + env: + AWS_S3_BUCKET: ${{ secrets.CLOUDFLARE_BUCKET }} + AWS_ACCESS_KEY_ID: ${{ secrets.CLOUDFLARE_ACCESS_KEY_ID }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.CLOUDFLARE_SECRET_ACCESS_KEY }} + SOURCE_DIR: ./release/Spacemesh Setup ${{ steps.package-version.outputs.version }}.exe + DEST_DIR: 'dist/pr-${{ github.sha }}' + AWS_S3_ENDPOINT: https://${{ secrets.CLOUDFLARE_ACCOUNT_ID }}.r2.cloudflarestorage.com - if: matrix.platform == 'linux' name: Upload linux build to R2 - uses: shallwefootball/s3-upload-action@master - env: - preSuffix: ${{ matrix.arch != '' && '_' || '' }} + uses: jakejarvis/s3-sync-action@master with: - aws_key_id: ${{ secrets.CLOUDFLARE_ACCESS_KEY_ID }} - aws_secret_access_key: ${{ secrets.CLOUDFLARE_SECRET_ACCESS_KEY}} - aws_bucket: ${{ secrets.CLOUDFLARE_BUCKET }} - source_dir: ./release/spacemesh_app_${{ steps.package-version.outputs.version }}${{ env.preSuffix }}${{ matrix.arch }}.deb - destination_dir: dist/pr-${{ github.sha }} - endpoint: https://${{ secrets.CLOUDFLARE_ACCOUNT_ID }}.r2.cloudflarestorage.com + args: --acl public-read --follow-symlinks --delete + env: + AWS_S3_BUCKET: ${{ secrets.CLOUDFLARE_BUCKET }} + AWS_ACCESS_KEY_ID: ${{ secrets.CLOUDFLARE_ACCESS_KEY_ID }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.CLOUDFLARE_SECRET_ACCESS_KEY }} + SOURCE_DIR: ./release/spacemesh_app_${{ steps.package-version.outputs.version }}${{ matrix.arch != '' && '_' || '' }}${{ matrix.arch }}.deb + DEST_DIR: 'dist/pr-${{ github.sha }}' + AWS_S3_ENDPOINT: https://${{ secrets.CLOUDFLARE_ACCOUNT_ID }}.r2.cloudflarestorage.com - if: matrix.platform == 'linux' name: Upload linux build to R2 - uses: shallwefootball/s3-upload-action@master - env: - arch: ${{ matrix.arch == 'arm64' && '-arm64' || '' }} + uses: jakejarvis/s3-sync-action@master with: - aws_key_id: ${{ secrets.CLOUDFLARE_ACCESS_KEY_ID }} - aws_secret_access_key: ${{ secrets.CLOUDFLARE_SECRET_ACCESS_KEY}} - aws_bucket: ${{ secrets.CLOUDFLARE_BUCKET }} - source_dir: ./release/Spacemesh-${{ steps.package-version.outputs.version }}${{ env.arch }}.AppImage - destination_dir: dist/pr-${{ github.sha }} - endpoint: https://${{ secrets.CLOUDFLARE_ACCOUNT_ID }}.r2.cloudflarestorage.com + args: --acl public-read --follow-symlinks --delete + env: + AWS_S3_BUCKET: ${{ secrets.CLOUDFLARE_BUCKET }} + AWS_ACCESS_KEY_ID: ${{ secrets.CLOUDFLARE_ACCESS_KEY_ID }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.CLOUDFLARE_SECRET_ACCESS_KEY }} + SOURCE_DIR: ./release/Spacemesh-${{ steps.package-version.outputs.version }}${{ matrix.arch == 'arm64' && '-arm64' || '' }}.AppImage + DEST_DIR: 'dist/pr-${{ github.sha }}' + AWS_S3_ENDPOINT: https://${{ secrets.CLOUDFLARE_ACCOUNT_ID }}.r2.cloudflarestorage.com post-links: runs-on: ubuntu-latest From 81f6de868b843945d67fc6ab2352027beb2ea0ef Mon Sep 17 00:00:00 2001 From: andres-spacemesh <106999199+andres-spacemesh@users.noreply.github.com> Date: Wed, 17 Jul 2024 15:44:11 -0700 Subject: [PATCH 03/10] Change to aws cli --- .github/workflows/pr-build.yml | 68 ++++++++++++++++------------------ 1 file changed, 31 insertions(+), 37 deletions(-) diff --git a/.github/workflows/pr-build.yml b/.github/workflows/pr-build.yml index fe9571914..f9b3e680a 100644 --- a/.github/workflows/pr-build.yml +++ b/.github/workflows/pr-build.yml @@ -267,57 +267,51 @@ jobs: destination: ${{ secrets.GCP_BUCKET }}/pr-${{ github.sha }} # Upload artifacts to Cloudflare + + - name: Set Up AWS export_default_credentials + uses: aws-actions/configure-aws-credentials@v4 + with: + aws-access-key-id: ${{ secrets.CLOUDFLARE_ACCESS_KEY_ID }} + aws-secret-access-key: ${{ secrets.CLOUDFLARE_SECRET_ACCESS_KEY}} + - if: matrix.platform == 'macos' name: Upload macos build to R2 - uses: jakejarvis/s3-sync-action@master - with: - args: --acl public-read --follow-symlinks --delete env: - AWS_S3_BUCKET: ${{ secrets.CLOUDFLARE_BUCKET }} - AWS_ACCESS_KEY_ID: ${{ secrets.CLOUDFLARE_ACCESS_KEY_ID }} - AWS_SECRET_ACCESS_KEY: ${{ secrets.CLOUDFLARE_SECRET_ACCESS_KEY }} - SOURCE_DIR: ./release/Spacemesh-${{ steps.package-version.outputs.version }}${{ matrix.arch != '' && '-' || '' }}${{ matrix.arch }}.dmg - DEST_DIR: 'dist/pr-${{ github.sha }}' - AWS_S3_ENDPOINT: https://${{ secrets.CLOUDFLARE_ACCOUNT_ID }}.r2.cloudflarestorage.com + preSuffix: ${{ matrix.arch != '' && '-' || '' }} + run: | + BUILD_PATH='Spacemesh-${{ steps.package-version.outputs.version }}${{ env.preSuffix }}${{ matrix.arch }}.dmg' + + aws s3 cp ./release/${BUILD_PATH} s3://${{ secrets.CLOUDFLARE_BUCKET }}/dist/pr-${{ github.sha }}/${BUILD_PATH} \ + --endpoint-url https://${{ secrets.CLOUDFLARE_ACCOUNT_ID }}.r2.cloudflarestorage.com - if: matrix.platform == 'windows' name: Upload windows build to R2 - uses: jakejarvis/s3-sync-action@master - with: - args: --acl public-read --follow-symlinks --delete - env: - AWS_S3_BUCKET: ${{ secrets.CLOUDFLARE_BUCKET }} - AWS_ACCESS_KEY_ID: ${{ secrets.CLOUDFLARE_ACCESS_KEY_ID }} - AWS_SECRET_ACCESS_KEY: ${{ secrets.CLOUDFLARE_SECRET_ACCESS_KEY }} - SOURCE_DIR: ./release/Spacemesh Setup ${{ steps.package-version.outputs.version }}.exe - DEST_DIR: 'dist/pr-${{ github.sha }}' - AWS_S3_ENDPOINT: https://${{ secrets.CLOUDFLARE_ACCOUNT_ID }}.r2.cloudflarestorage.com + run: | + BUILD_PATH='Spacemesh Setup ${{ steps.package-version.outputs.version }}.exe' + + aws s3 cp ./release/${BUILD_PATH} s3://${{ secrets.CLOUDFLARE_BUCKET }}/dist/pr-${{ github.sha }}/${BUILD_PATH} \ + --endpoint-url https://${{ secrets.CLOUDFLARE_ACCOUNT_ID }}.r2.cloudflarestorage.com - if: matrix.platform == 'linux' name: Upload linux build to R2 - uses: jakejarvis/s3-sync-action@master - with: - args: --acl public-read --follow-symlinks --delete env: - AWS_S3_BUCKET: ${{ secrets.CLOUDFLARE_BUCKET }} - AWS_ACCESS_KEY_ID: ${{ secrets.CLOUDFLARE_ACCESS_KEY_ID }} - AWS_SECRET_ACCESS_KEY: ${{ secrets.CLOUDFLARE_SECRET_ACCESS_KEY }} - SOURCE_DIR: ./release/spacemesh_app_${{ steps.package-version.outputs.version }}${{ matrix.arch != '' && '_' || '' }}${{ matrix.arch }}.deb - DEST_DIR: 'dist/pr-${{ github.sha }}' - AWS_S3_ENDPOINT: https://${{ secrets.CLOUDFLARE_ACCOUNT_ID }}.r2.cloudflarestorage.com + preSuffix: ${{ matrix.arch != '' && '_' || '' }} + run: | + BUILD_PATH='spacemesh_app_${{ steps.package-version.outputs.version }}${{ env.preSuffix }}${{ matrix.arch }}.deb' + + aws s3 cp ./release/${BUILD_PATH} s3://${{ secrets.CLOUDFLARE_BUCKET }}/dist/pr-${{ github.sha }}/${BUILD_PATH} \ + --endpoint-url https://${{ secrets.CLOUDFLARE_ACCOUNT_ID }}.r2.cloudflarestorage.com + - if: matrix.platform == 'linux' name: Upload linux build to R2 - uses: jakejarvis/s3-sync-action@master - with: - args: --acl public-read --follow-symlinks --delete env: - AWS_S3_BUCKET: ${{ secrets.CLOUDFLARE_BUCKET }} - AWS_ACCESS_KEY_ID: ${{ secrets.CLOUDFLARE_ACCESS_KEY_ID }} - AWS_SECRET_ACCESS_KEY: ${{ secrets.CLOUDFLARE_SECRET_ACCESS_KEY }} - SOURCE_DIR: ./release/Spacemesh-${{ steps.package-version.outputs.version }}${{ matrix.arch == 'arm64' && '-arm64' || '' }}.AppImage - DEST_DIR: 'dist/pr-${{ github.sha }}' - AWS_S3_ENDPOINT: https://${{ secrets.CLOUDFLARE_ACCOUNT_ID }}.r2.cloudflarestorage.com + arch: ${{ matrix.arch == 'arm64' && '-arm64' || '' }} + run: | + BUILD_PATH='Spacemesh-${{ steps.package-version.outputs.version }}${{ env.arch }}.AppImage' + + aws s3 cp ./release/${BUILD_PATH} s3://${{ secrets.CLOUDFLARE_BUCKET }}/dist/pr-${{ github.sha }}/${BUILD_PATH} \ + --endpoint-url https://${{ secrets.CLOUDFLARE_ACCOUNT_ID }}.r2.cloudflarestorage.com post-links: runs-on: ubuntu-latest From a207103e3b8c16c3b22493f3630302e7c841cb63 Mon Sep 17 00:00:00 2001 From: andres-spacemesh <106999199+andres-spacemesh@users.noreply.github.com> Date: Wed, 17 Jul 2024 15:56:27 -0700 Subject: [PATCH 04/10] Add region to aws creds --- .github/workflows/pr-build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/pr-build.yml b/.github/workflows/pr-build.yml index f9b3e680a..247db382a 100644 --- a/.github/workflows/pr-build.yml +++ b/.github/workflows/pr-build.yml @@ -273,6 +273,7 @@ jobs: with: aws-access-key-id: ${{ secrets.CLOUDFLARE_ACCESS_KEY_ID }} aws-secret-access-key: ${{ secrets.CLOUDFLARE_SECRET_ACCESS_KEY}} + region: ${{ secrets.CLOUDFLARE_BUCKET_REGION}} - if: matrix.platform == 'macos' name: Upload macos build to R2 From 727fb155b332334083ed2847b620c7cb08ad2d86 Mon Sep 17 00:00:00 2001 From: andres-spacemesh <106999199+andres-spacemesh@users.noreply.github.com> Date: Wed, 17 Jul 2024 16:01:08 -0700 Subject: [PATCH 05/10] Fix aws cred input --- .github/workflows/pr-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr-build.yml b/.github/workflows/pr-build.yml index 247db382a..c89a1e1c6 100644 --- a/.github/workflows/pr-build.yml +++ b/.github/workflows/pr-build.yml @@ -273,7 +273,7 @@ jobs: with: aws-access-key-id: ${{ secrets.CLOUDFLARE_ACCESS_KEY_ID }} aws-secret-access-key: ${{ secrets.CLOUDFLARE_SECRET_ACCESS_KEY}} - region: ${{ secrets.CLOUDFLARE_BUCKET_REGION}} + aws-region: ${{ secrets.CLOUDFLARE_BUCKET_REGION}} - if: matrix.platform == 'macos' name: Upload macos build to R2 From 7facb8a9e625050d67f2e782698fd2ef2ef4dda0 Mon Sep 17 00:00:00 2001 From: andres-spacemesh <106999199+andres-spacemesh@users.noreply.github.com> Date: Thu, 18 Jul 2024 06:55:37 -0700 Subject: [PATCH 06/10] Add aws cli config --- .github/workflows/pr-build.yml | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pr-build.yml b/.github/workflows/pr-build.yml index c89a1e1c6..d1debb345 100644 --- a/.github/workflows/pr-build.yml +++ b/.github/workflows/pr-build.yml @@ -268,12 +268,23 @@ jobs: # Upload artifacts to Cloudflare + - if: matrix.platform == 'macos' + name: aws cli macos + run: brew install awscli + + - if: matrix.platform == 'windows' + name: aws cli windows + run: choco install awscli + + - if: matrix.platform == 'linux' + name: aws cli linux + run: sudo apt install awscli + - name: Set Up AWS export_default_credentials - uses: aws-actions/configure-aws-credentials@v4 - with: - aws-access-key-id: ${{ secrets.CLOUDFLARE_ACCESS_KEY_ID }} - aws-secret-access-key: ${{ secrets.CLOUDFLARE_SECRET_ACCESS_KEY}} - aws-region: ${{ secrets.CLOUDFLARE_BUCKET_REGION}} + run: | + aws configure set aws_access_key_id ${{ secrets.CLOUDFLARE_ACCESS_KEY_ID }} && \ + aws configure set aws_secret_access_key ${{ secrets.CLOUDFLARE_SECRET_ACCESS_KEY }} && \ + aws configure set region ${{ secrets.CLOUDFLARE_BUCKET_REGION }} - if: matrix.platform == 'macos' name: Upload macos build to R2 From 540e5da69d4e80c55d5e144211405e194a0f62b4 Mon Sep 17 00:00:00 2001 From: andres-spacemesh <106999199+andres-spacemesh@users.noreply.github.com> Date: Thu, 18 Jul 2024 07:16:05 -0700 Subject: [PATCH 07/10] Remove macos cli installation --- .github/workflows/pr-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr-build.yml b/.github/workflows/pr-build.yml index d1debb345..baf2b7189 100644 --- a/.github/workflows/pr-build.yml +++ b/.github/workflows/pr-build.yml @@ -270,7 +270,7 @@ jobs: - if: matrix.platform == 'macos' name: aws cli macos - run: brew install awscli + run: aws --version - if: matrix.platform == 'windows' name: aws cli windows From a6c75a111087bff0c21001c895265d744cbd8a35 Mon Sep 17 00:00:00 2001 From: andres-spacemesh <106999199+andres-spacemesh@users.noreply.github.com> Date: Thu, 18 Jul 2024 07:32:47 -0700 Subject: [PATCH 08/10] Fix aws configure for windows --- .github/workflows/pr-build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr-build.yml b/.github/workflows/pr-build.yml index baf2b7189..08b845956 100644 --- a/.github/workflows/pr-build.yml +++ b/.github/workflows/pr-build.yml @@ -282,8 +282,8 @@ jobs: - name: Set Up AWS export_default_credentials run: | - aws configure set aws_access_key_id ${{ secrets.CLOUDFLARE_ACCESS_KEY_ID }} && \ - aws configure set aws_secret_access_key ${{ secrets.CLOUDFLARE_SECRET_ACCESS_KEY }} && \ + aws configure set aws_access_key_id ${{ secrets.CLOUDFLARE_ACCESS_KEY_ID }} + aws configure set aws_secret_access_key ${{ secrets.CLOUDFLARE_SECRET_ACCESS_KEY }} aws configure set region ${{ secrets.CLOUDFLARE_BUCKET_REGION }} - if: matrix.platform == 'macos' From bafd61f95fd32777637cadc3966a97b7aba9449e Mon Sep 17 00:00:00 2001 From: andres-spacemesh <106999199+andres-spacemesh@users.noreply.github.com> Date: Thu, 18 Jul 2024 07:58:46 -0700 Subject: [PATCH 09/10] Fix aws cli syntax for windows --- .github/workflows/pr-build.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pr-build.yml b/.github/workflows/pr-build.yml index 08b845956..ea97c0c22 100644 --- a/.github/workflows/pr-build.yml +++ b/.github/workflows/pr-build.yml @@ -299,10 +299,9 @@ jobs: - if: matrix.platform == 'windows' name: Upload windows build to R2 run: | - BUILD_PATH='Spacemesh Setup ${{ steps.package-version.outputs.version }}.exe' + $BUILD_PATH='Spacemesh Setup ${{ steps.package-version.outputs.version }}.exe' - aws s3 cp ./release/${BUILD_PATH} s3://${{ secrets.CLOUDFLARE_BUCKET }}/dist/pr-${{ github.sha }}/${BUILD_PATH} \ - --endpoint-url https://${{ secrets.CLOUDFLARE_ACCOUNT_ID }}.r2.cloudflarestorage.com + aws s3 cp "./release/$BUILD_PATH" "s3://${{ secrets.CLOUDFLARE_BUCKET }}/dist/pr-${{ github.sha }}/$BUILD_PATH" --endpoint-url https://${{ secrets.CLOUDFLARE_ACCOUNT_ID }}.r2.cloudflarestorage.com - if: matrix.platform == 'linux' name: Upload linux build to R2 From c6e358b5b56d72be2ed4f71bc8b39a673c4199e1 Mon Sep 17 00:00:00 2001 From: andres-spacemesh <106999199+andres-spacemesh@users.noreply.github.com> Date: Thu, 18 Jul 2024 08:30:51 -0700 Subject: [PATCH 10/10] Update links to artifacts --- .github/workflows/pr-build.yml | 27 +++++++++++---------------- 1 file changed, 11 insertions(+), 16 deletions(-) diff --git a/.github/workflows/pr-build.yml b/.github/workflows/pr-build.yml index ea97c0c22..ced8a8be2 100644 --- a/.github/workflows/pr-build.yml +++ b/.github/workflows/pr-build.yml @@ -267,11 +267,6 @@ jobs: destination: ${{ secrets.GCP_BUCKET }}/pr-${{ github.sha }} # Upload artifacts to Cloudflare - - - if: matrix.platform == 'macos' - name: aws cli macos - run: aws --version - - if: matrix.platform == 'windows' name: aws cli windows run: choco install awscli @@ -330,13 +325,13 @@ jobs: steps: - name: Links to artifacts run: | - echo "Windows (x64): https://storage.googleapis.com/smapp/pr-${{ github.sha }}/Spacemesh%20Setup%20${{ needs.build-and-upload.outputs.version }}.exe" - echo "macOS (x64): https://storage.googleapis.com/smapp/pr-${{ github.sha }}/Spacemesh-${{ needs.build-and-upload.outputs.version }}.dmg" - echo "macOS (arm64): https://storage.googleapis.com/smapp/pr-${{ github.sha }}/Spacemesh-${{ needs.build-and-upload.outputs.version }}-arm64.dmg" - echo "Linux (deb, amd64): https://storage.googleapis.com/smapp/pr-${{ github.sha }}/spacemesh_app_${{ needs.build-and-upload.outputs.version }}_amd64.deb" - echo "Linux (AppImage, amd64): https://storage.googleapis.com/smapp/pr-${{ github.sha }}/Spacemesh-${{ needs.build-and-upload.outputs.version }}.AppImage" - echo "Linux (deb, arm64): https://storage.googleapis.com/smapp/pr-${{ github.sha }}/spacemesh_app_${{ needs.build-and-upload.outputs.version }}_arm64.deb" - echo "Linux (AppImage, arm64): https://storage.googleapis.com/smapp/pr-${{ github.sha }}/Spacemesh-${{ needs.build-and-upload.outputs.version }}-arm64.AppImage" + echo "Windows (x64): https://smapp.spacemesh.network/dist/pr-${{ github.sha }}/Spacemesh%20Setup%20${{ needs.build-and-upload.outputs.version }}.exe" + echo "macOS (x64): https://smapp.spacemesh.network/dist/pr-${{ github.sha }}/Spacemesh-${{ needs.build-and-upload.outputs.version }}.dmg" + echo "macOS (arm64): https://smapp.spacemesh.network/dist/pr-${{ github.sha }}/Spacemesh-${{ needs.build-and-upload.outputs.version }}-arm64.dmg" + echo "Linux (deb, amd64): https://smapp.spacemesh.network/dist/pr-${{ github.sha }}/spacemesh_app_${{ needs.build-and-upload.outputs.version }}_amd64.deb" + echo "Linux (AppImage, amd64): https://smapp.spacemesh.network/dist/pr-${{ github.sha }}/Spacemesh-${{ needs.build-and-upload.outputs.version }}.AppImage" + echo "Linux (deb, arm64): https://smapp.spacemesh.network/dist/pr-${{ github.sha }}/spacemesh_app_${{ needs.build-and-upload.outputs.version }}_arm64.deb" + echo "Linux (AppImage, arm64): https://smapp.spacemesh.network/dist/pr-${{ github.sha }}/Spacemesh-${{ needs.build-and-upload.outputs.version }}-arm64.AppImage" - name: Post links to PR if: github.event_name == 'pull_request' uses: mshick/add-pr-comment@v1 @@ -345,8 +340,8 @@ jobs: with: message: | ## Compiled Binaries - - Windows: [x64](https://storage.googleapis.com/smapp/pr-${{ github.sha }}/Spacemesh%20Setup%20${{ needs.build-and-upload.outputs.version }}.exe) - - macOS: [x64](https://storage.googleapis.com/smapp/pr-${{ github.sha }}/Spacemesh-${{ needs.build-and-upload.outputs.version }}.dmg) [arm64](https://storage.googleapis.com/smapp/pr-${{ github.sha }}/Spacemesh-${{ needs.build-and-upload.outputs.version }}-arm64.dmg) + - Windows: [x64](https://smapp.spacemesh.network/dist/pr-${{ github.sha }}/Spacemesh%20Setup%20${{ needs.build-and-upload.outputs.version }}.exe) + - macOS: [x64](https://smapp.spacemesh.network/dist/pr-${{ github.sha }}/Spacemesh-${{ needs.build-and-upload.outputs.version }}.dmg) [arm64](https://smapp.spacemesh.network/dist/pr-${{ github.sha }}/Spacemesh-${{ needs.build-and-upload.outputs.version }}-arm64.dmg) - Linux - - AppImage [x64](https://storage.googleapis.com/smapp/pr-${{ github.sha }}/Spacemesh-${{ needs.build-and-upload.outputs.version }}.AppImage) [arm64](https://storage.googleapis.com/smapp/pr-${{ github.sha }}/Spacemesh-${{ needs.build-and-upload.outputs.version }}-arm64.AppImage) - - deb [x64](https://storage.googleapis.com/smapp/pr-${{ github.sha }}/spacemesh_app_${{ needs.build-and-upload.outputs.version }}_amd64.deb) [arm64](https://storage.googleapis.com/smapp/pr-${{ github.sha }}/spacemesh_app_${{ needs.build-and-upload.outputs.version }}_arm64.deb) + - AppImage [x64](https://smapp.spacemesh.network/dist/pr-${{ github.sha }}/Spacemesh-${{ needs.build-and-upload.outputs.version }}.AppImage) [arm64](https://smapp.spacemesh.network/dist/pr-${{ github.sha }}/Spacemesh-${{ needs.build-and-upload.outputs.version }}-arm64.AppImage) + - deb [x64](https://smapp.spacemesh.network/dist/pr-${{ github.sha }}/spacemesh_app_${{ needs.build-and-upload.outputs.version }}_amd64.deb) [arm64](https://smapp.spacemesh.network/dist/pr-${{ github.sha }}/spacemesh_app_${{ needs.build-and-upload.outputs.version }}_arm64.deb)