From 642bec91a809d739adb350688053f32f060cdd7c Mon Sep 17 00:00:00 2001 From: Dominik Kapusta Date: Sat, 3 Feb 2024 09:17:25 +0100 Subject: [PATCH] Report success after uploading dSYMs --- .github/actions/asana-log-message/action.yml | 4 +-- .github/workflows/build_appstore.yml | 30 +++++++++++++------- .github/workflows/build_notarized.yml | 19 +++++++++---- 3 files changed, 35 insertions(+), 18 deletions(-) diff --git a/.github/actions/asana-log-message/action.yml b/.github/actions/asana-log-message/action.yml index 5ab0781ddb..043f305be5 100644 --- a/.github/actions/asana-log-message/action.yml +++ b/.github/actions/asana-log-message/action.yml @@ -19,8 +19,8 @@ runs: - id: get-automation-subtask uses: ./.github/actions/asana-get-release-automation-subtask-id with: - access-token: ${{ input.access-token }} - task-url: ${{ input.task-url }} + access-token: ${{ inputs.access-token }} + task-url: ${{ inputs.task-url }} - id: add-colaborator shell: bash diff --git a/.github/workflows/build_appstore.yml b/.github/workflows/build_appstore.yml index c0d95b4349..1f79b69bdc 100644 --- a/.github/workflows/build_appstore.yml +++ b/.github/workflows/build_appstore.yml @@ -114,31 +114,39 @@ jobs: MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }} run: | bundle exec fastlane release_${{ env.destination }} - dsyms_path="${{ github.workspace }}/DuckDuckGo-AppStore.app.dSYM.zip" - mv -f "${{ github.workspace }}/DuckDuckGo App Store.app.dSYM.zip" "${dsyms_path}" + dsym_path="${{ github.workspace }}/DuckDuckGo-AppStore.app.dSYM.zip" + mv -f "${{ github.workspace }}/DuckDuckGo App Store.app.dSYM.zip" "${dsym_path}" version="$(cut -d ' ' -f 3 < Configuration/Version.xcconfig)" build_number="$(cut -d ' ' -f 3 < Configuration/BuildNumber.xcconfig)" - echo "dsyms_path=${dsyms_path}" >> $GITHUB_ENV - echo "app_version=${version}.${build_number}" >> $GITHUB_ENV + echo "dsym-path=${dsym_path}" >> $GITHUB_ENV + echo "app-version=${version}.${build_number}" >> $GITHUB_ENV - name: Upload dSYMs artifact uses: actions/upload-artifact@v4 with: - name: DuckDuckGo-${{ env.destination }}-dSYM-${{ env.app_version }} - path: ${{ env.dsyms_path }} + name: DuckDuckGo-${{ env.destination }}-dSYM-${{ env.app-version }} + path: ${{ env.dsym-path }} - name: Upload dSYMs to S3 + id: upload-dsyms-to-s3 if: ${{ env.upload-to == 's3' }} env: AWS_ACCESS_KEY_ID: ${{ secrets.TEST_AWS_ACCESS_KEY_ID }} AWS_SECRET_ACCESS_KEY: ${{ secrets.TEST_AWS_SECRET_ACCESS_KEY }} AWS_DEFAULT_REGION: ${{ vars.TEST_AWS_DEFAULT_REGION }} - TEST_DSYM_BUCKET_NAME: ${{ vars.TEST_DSYM_BUCKET_NAME }} - TEST_DSYM_BUCKET_PREFIX: ${{ vars.TEST_DSYM_BUCKET_PREFIX }} + DSYM_S3_PATH: s3://${{ vars.TEST_DSYM_BUCKET_NAME }}/${{ vars.TEST_DSYM_BUCKET_PREFIX_APPSTORE }}/DuckDuckGo-${{ env.app-version }}-dSYM.zip run: | - aws s3 cp \ - ${{ github.workspace }}/release/DuckDuckGo-${{ env.app-version }}-dSYM.zip \ - s3://${{ env.TEST_DSYM_BUCKET_NAME }}/${{ env.TEST_DSYM_BUCKET_PREFIX }}/ + echo "dsym-s3-path=${DSYM_S3_PATH}" >> $GITHUB_OUTPUT + aws s3 cp ${{ env.dsym-path }} ${{ env.DSYM_S3_PATH }} + + - name: Report success + uses: ./.github/actions/asana-log-message + env: + DSYM_S3_PATH: ${{ steps.upload-dsyms-to-s3.outputs.dsym-s3-path }} + with: + task-url: ${{ env.asana-task-url }} + access-token: ${{ secrets.ASANA_ACCESS_TOKEN }} + comment: "Debug symbols for ${{ env.app-version }} build are uploaded to ${{ env.DSYM_S3_PATH }}." - name: Send Mattermost message env: diff --git a/.github/workflows/build_notarized.yml b/.github/workflows/build_notarized.yml index 0ebe3e9964..d5bb4b685a 100644 --- a/.github/workflows/build_notarized.yml +++ b/.github/workflows/build_notarized.yml @@ -194,17 +194,26 @@ jobs: task-id: ${{ steps.task-id.outputs.task-id }} - name: Upload dSYMs to S3 + id: upload-dsyms-to-s3 if: ${{ env.upload-to == 's3' }} env: AWS_ACCESS_KEY_ID: ${{ secrets.TEST_AWS_ACCESS_KEY_ID }} AWS_SECRET_ACCESS_KEY: ${{ secrets.TEST_AWS_SECRET_ACCESS_KEY }} AWS_DEFAULT_REGION: ${{ vars.TEST_AWS_DEFAULT_REGION }} - TEST_DSYM_BUCKET_NAME: ${{ vars.TEST_DSYM_BUCKET_NAME }} - TEST_DSYM_BUCKET_PREFIX: ${{ vars.TEST_DSYM_BUCKET_PREFIX }} + DSYM_NAME: DuckDuckGo-${{ env.app-version }}-dSYM.zip + DSYM_S3_PATH: s3://${{ vars.TEST_DSYM_BUCKET_NAME }}/${{ vars.TEST_DSYM_BUCKET_PREFIX }}/${{ env.DSYM_NAME }} run: | - aws s3 cp \ - ${{ github.workspace }}/release/DuckDuckGo-${{ env.app-version }}-dSYM.zip \ - s3://${{ env.TEST_DSYM_BUCKET_NAME }}/${{ env.TEST_DSYM_BUCKET_PREFIX }}/ + echo "dsym-s3-path=${DSYM_S3_PATH}" >> $GITHUB_OUTPUT + aws s3 cp ${{ github.workspace }}/release/${{ env.DSYM_NAME }} ${{ env.DSYM_S3_PATH }} + + - name: Report success + uses: ./.github/actions/asana-log-message + env: + DSYM_S3_PATH: ${{ steps.upload-dsyms-to-s3.outputs.dsym-s3-path }} + with: + task-url: ${{ env.asana-task-url }} + access-token: ${{ secrets.ASANA_ACCESS_TOKEN }} + comment: "Debug symbols for ${{ env.app-version }} build are uploaded to ${{ env.DSYM_S3_PATH }}." create-dmg: