diff --git a/.github/workflows/compile_test_release.yml b/.github/workflows/compile_test_release.yml index 4014915..d0571fa 100644 --- a/.github/workflows/compile_test_release.yml +++ b/.github/workflows/compile_test_release.yml @@ -1,6 +1,6 @@ name: Compile, Test and Release -on: [pull_request] +on: [ push, pull_request ] defaults: run: @@ -152,3 +152,17 @@ jobs: with: name: ${{ matrix.config.artifact }} path: ${{ runner.temp }}/shadow_build_dir/package/${{ matrix.config.artifact }} + + - name: Upload artifact to S3 Bucket + if: ${{ matrix.config.save-artifact && github.event_name == 'push' }} + uses: jakejarvis/s3-sync-action@master + with: + args: --acl public-read + env: + AWS_S3_BUCKET: qgroundcontrol + AWS_REGION: 'us-west-1' + AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + SOURCE_DIR: ${{ runner.temp }}/shadow_build_dir/package/${{ matrix.config.artifact }} + LOCAL_DIR: 'master' +