diff --git a/.github/workflows/android_release.yml b/.github/workflows/android_release.yml index 5ed1904..beb90d3 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 61235e2..e890fcc 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 e13f697..e9687ac 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 1a708d6..8d08bf9 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 +