From 164a3b8787a4e21f590146108405a4ca4056f6ed Mon Sep 17 00:00:00 2001 From: Don Gagne Date: Tue, 14 Dec 2021 11:06:12 -0800 Subject: [PATCH] Tagged version support Fix --- .github/workflows/android_32_release.yml | 19 +++++++++++++++---- .github/workflows/android_64_release.yml | 19 +++++++++++++++---- .github/workflows/linux_release.yml | 19 +++++++++++++++---- .github/workflows/macos_release.yml | 20 +++++++++++++++----- .github/workflows/windows_release.yml | 22 +++++++++++++++++----- 5 files changed, 77 insertions(+), 22 deletions(-) diff --git a/.github/workflows/android_32_release.yml b/.github/workflows/android_32_release.yml index f9315be..73d04db 100644 --- a/.github/workflows/android_32_release.yml +++ b/.github/workflows/android_32_release.yml @@ -4,7 +4,10 @@ name: Android 32-bit Release on: push: branches: - - 'master' + - 'master' + - 'Stable*' + tags: + - 'v*' pull_request: branches: - '*' @@ -114,10 +117,18 @@ jobs: name: ${{ env.ARTIFACT }} path: ${{ runner.temp }}/shadow_build_dir/package/${{ env.ARTIFACT }} - - name: Upload to S3 Bucket - if: github.event_name == 'push' + - 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/master/${ARTIFACT} --region us-west-2 --acl public-read + aws s3 cp ${ARTIFACT} s3://qgroundcontrol/builds/${GIT_BRANCH_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/android_64_release.yml b/.github/workflows/android_64_release.yml index 81ccaa7..8fb2909 100644 --- a/.github/workflows/android_64_release.yml +++ b/.github/workflows/android_64_release.yml @@ -4,7 +4,10 @@ name: Android 64-bit Release on: push: branches: - - 'master' + - 'master' + - 'Stable*' + tags: + - 'v*' pull_request: branches: - '*' @@ -114,10 +117,18 @@ jobs: name: ${{ env.ARTIFACT }} path: ${{ runner.temp }}/shadow_build_dir/package/${{ env.ARTIFACT }} - - name: Upload to S3 Bucket - if: github.event_name == 'push' + - 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/master/${ARTIFACT} --region us-west-2 --acl public-read + aws s3 cp ${ARTIFACT} s3://qgroundcontrol/builds/${GIT_BRANCH_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/linux_release.yml b/.github/workflows/linux_release.yml index f0351db..d99e718 100644 --- a/.github/workflows/linux_release.yml +++ b/.github/workflows/linux_release.yml @@ -3,7 +3,10 @@ name: Linux Release on: push: branches: - - 'master' + - 'master' + - 'Stable*' + tags: + - 'v*' pull_request: branches: - '*' @@ -94,10 +97,18 @@ jobs: name: ${{ env.ARTIFACT }} path: ${{ runner.temp }}/shadow_build_dir/package/${{ env.ARTIFACT }} - - name: Upload to S3 Bucket - if: github.event_name == 'push' + - 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/master/${ARTIFACT} --region us-west-2 --acl public-read + aws s3 cp ${ARTIFACT} s3://qgroundcontrol/builds/${GIT_BRANCH_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 f57f9c4..047bce9 100644 --- a/.github/workflows/macos_release.yml +++ b/.github/workflows/macos_release.yml @@ -3,11 +3,13 @@ name: MacOS Release on: push: branches: - - 'master' - - 'Stable*' + - 'master' + - 'Stable*' + tags: + - 'v*' pull_request: branches: - - '*' + - '*' defaults: run: @@ -92,10 +94,18 @@ jobs: id: git-branch-name uses: EthanSK/git-branch-name-action@v1 - - name: Upload to S3 Bucket - if: github.event_name == 'push' + - 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/${GIT_BRANCH_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 5a22554..a20099b 100644 --- a/.github/workflows/windows_release.yml +++ b/.github/workflows/windows_release.yml @@ -3,7 +3,10 @@ name: Windows Release on: push: branches: - - 'master' + - 'master' + - 'Stable*' + tags: + - 'v*' pull_request: branches: - '*' @@ -92,10 +95,19 @@ jobs: name: qgroundcontrol.pdb path: ${{ runner.temp }}\shadow_build_dir\staging\qgroundcontrol.pdb - - name: Upload to S3 Bucket - if: github.event_name == 'push' - working-directory: ${{ runner.temp }}\shadow_build_dir\staging + - 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 ${{ env.ARTIFACT }} s3://qgroundcontrol/builds/master/${{ env.ARTIFACT }} --region us-west-2 --acl public-read + aws s3 cp ${ARTIFACT} s3://qgroundcontrol/builds/${{ env.GIT_BRANCH_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/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/${{ env.ARTIFACT }} --region us-west-2 --acl public-read +