From 15bdfd5f16562a09ccb1a57808ed0405049645a7 Mon Sep 17 00:00:00 2001 From: Julian Oes Date: Tue, 11 Jun 2024 16:44:02 +1200 Subject: [PATCH] Revert ".github: Don't upload to S3, just for this particular branch, see details:" This reverts commit ab7c716b0ee38f05a3bf45da74d3facb5e0f4154. --- .github/workflows/android_release.yml | 16 ++++++++++++++++ .github/workflows/linux_release.yml | 16 ++++++++++++++++ .github/workflows/macos_release.yml | 16 ++++++++++++++++ .github/workflows/windows_release.yml | 17 +++++++++++++++++ 4 files changed, 65 insertions(+) diff --git a/.github/workflows/android_release.yml b/.github/workflows/android_release.yml index 5ed19043477..beb90d312fd 100644 --- a/.github/workflows/android_release.yml +++ b/.github/workflows/android_release.yml @@ -146,3 +146,19 @@ jobs: asset_name: ${{ matrix.ARTIFACT }} tag: ${{ github.ref }} overwrite: true + + - name: Upload build to S3 Bucket + if: github.event_name == 'push' + working-directory: ${{ runner.temp }}/shadow_build_dir/package + run: | + aws configure set aws_access_key_id ${{ secrets.AWS_ACCESS_KEY_ID }} + aws configure set aws_secret_access_key ${{ secrets.AWS_SECRET_ACCESS_KEY }} + aws s3 cp ${{ matrix.ARTIFACT }} s3://qgroundcontrol/builds/${{ github.ref_name }}/${{ matrix.ARTIFACT }} --region us-west-2 --acl public-read + + - name: Upload tagged stable build to S3 latest Bucket + if: github.event_name == 'push' && github.ref_type == 'tag' + working-directory: ${{ runner.temp }}/shadow_build_dir/package + run: | + aws configure set aws_access_key_id ${{ secrets.AWS_ACCESS_KEY_ID }} + aws configure set aws_secret_access_key ${{ secrets.AWS_SECRET_ACCESS_KEY }} + aws s3 cp ${{ matrix.ARTIFACT }} s3://qgroundcontrol/latest/${{ matrix.ARTIFACT }} --region us-west-2 --acl public-read diff --git a/.github/workflows/linux_release.yml b/.github/workflows/linux_release.yml index 61235e247d3..e890fcca345 100644 --- a/.github/workflows/linux_release.yml +++ b/.github/workflows/linux_release.yml @@ -115,3 +115,19 @@ jobs: asset_name: ${{ env.ARTIFACT }} tag: ${{ github.ref }} overwrite: true + + - name: Upload build to S3 Bucket + if: github.event_name == 'push' + working-directory: ${{ runner.temp }}/shadow_build_dir/package + run: | + aws configure set aws_access_key_id ${{ secrets.AWS_ACCESS_KEY_ID }} + aws configure set aws_secret_access_key ${{ secrets.AWS_SECRET_ACCESS_KEY }} + aws s3 cp ${ARTIFACT} s3://qgroundcontrol/builds/${{ github.ref_name }}/${ARTIFACT} --region us-west-2 --acl public-read + + - name: Upload tagged stable build to S3 latest Bucket + if: github.event_name == 'push' && github.ref_type == 'tag' + working-directory: ${{ runner.temp }}/shadow_build_dir/package + run: | + aws configure set aws_access_key_id ${{ secrets.AWS_ACCESS_KEY_ID }} + aws configure set aws_secret_access_key ${{ secrets.AWS_SECRET_ACCESS_KEY }} + aws s3 cp ${ARTIFACT} s3://qgroundcontrol/latest/${ARTIFACT} --region us-west-2 --acl public-read diff --git a/.github/workflows/macos_release.yml b/.github/workflows/macos_release.yml index e13f6973622..e9687ac4b32 100644 --- a/.github/workflows/macos_release.yml +++ b/.github/workflows/macos_release.yml @@ -112,3 +112,19 @@ jobs: asset_name: ${{ env.ARTIFACT }} tag: ${{ github.ref }} overwrite: true + + - name: Upload build to S3 Bucket + if: github.event_name == 'push' + working-directory: ${{ runner.temp }}/shadow_build_dir/package + run: | + aws configure set aws_access_key_id ${{ secrets.AWS_ACCESS_KEY_ID }} + aws configure set aws_secret_access_key ${{ secrets.AWS_SECRET_ACCESS_KEY }} + aws s3 cp ${ARTIFACT} s3://qgroundcontrol/builds/${{ github.ref_name }}/${ARTIFACT} --region us-west-2 --acl public-read + + - name: Upload tagged stable build to S3 latest Bucket + if: github.event_name == 'push' && github.ref_type == 'tag' + working-directory: ${{ runner.temp }}/shadow_build_dir/package + run: | + aws configure set aws_access_key_id ${{ secrets.AWS_ACCESS_KEY_ID }} + aws configure set aws_secret_access_key ${{ secrets.AWS_SECRET_ACCESS_KEY }} + aws s3 cp ${ARTIFACT} s3://qgroundcontrol/latest/${ARTIFACT} --region us-west-2 --acl public-read diff --git a/.github/workflows/windows_release.yml b/.github/workflows/windows_release.yml index 1a708d6c383..8d08bf92a00 100644 --- a/.github/workflows/windows_release.yml +++ b/.github/workflows/windows_release.yml @@ -126,3 +126,20 @@ jobs: asset_name: qgroundcontrol.pdb tag: ${{ github.ref }} overwrite: true + + - name: Upload build to S3 Bucket + if: github.event_name == 'push' + working-directory: ${{ runner.temp }}\shadow_build_dir\staging + run: | + aws configure set aws_access_key_id ${{ secrets.AWS_ACCESS_KEY_ID }} + aws configure set aws_secret_access_key ${{ secrets.AWS_SECRET_ACCESS_KEY }} + aws s3 cp ${{ env.ARTIFACT }} s3://qgroundcontrol/builds/${{ github.ref_name }}/${{ env.ARTIFACT }} --region us-west-2 --acl public-read + + - name: Upload tagged stable build to S3 latest Bucket + if: github.event_name == 'push' && github.ref_type == 'tag' + working-directory: ${{ runner.temp }}\shadow_build_dir\staging + run: | + aws configure set aws_access_key_id ${{ secrets.AWS_ACCESS_KEY_ID }} + aws configure set aws_secret_access_key ${{ secrets.AWS_SECRET_ACCESS_KEY }} + aws s3 cp ${{ env.ARTIFACT }} s3://qgroundcontrol/latest/${{ env.ARTIFACT }} --region us-west-2 --acl public-read +