diff --git a/.github/workflows/hotfix.yml b/.github/workflows/hotfix.yml index a6250ebce7..e4de085404 100644 --- a/.github/workflows/hotfix.yml +++ b/.github/workflows/hotfix.yml @@ -42,43 +42,16 @@ jobs: APPLE_API_KEY_ISSUER: ${{ secrets.APPLE_API_KEY_ISSUER }} # Elevated permissions token is needed here to use GH git/refs API (used by fastlane) GH_TOKEN: ${{ secrets.GHA_ELEVATED_PERMISSIONS_TOKEN }} + ASANA_ACCESS_TOKEN: ${{ secrets.ASANA_ACCESS_TOKEN }} run: | - git config --global user.name "Dax the Duck" - git config --global user.email "dax@duckduckgo.com" last_release="$(gh api repos/${{ github.repository }}/releases/latest | jq -r .tag_name)" echo "last_release=$last_release" >> $GITHUB_OUTPUT - bundle exec fastlane prepare_hotfix version:"$last_release" - - - name: Create release task - id: create_release_task - env: - ASANA_ACCESS_TOKEN: ${{ secrets.ASANA_ACCESS_TOKEN }} - run: | - version="$(echo ${{ steps.make_release_branch.outputs.release_branch_name }} | cut -d '/' -f 2)" - task_name="macOS App Hotfix Release $version" - asana_task_id="$(curl -fLSs -X POST "https://app.asana.com/api/1.0/task_templates/${{ vars.MACOS_HOTFIX_TASK_TEMPLATE_ID }}/instantiateTask" \ - -H "Authorization: Bearer ${{ env.ASANA_ACCESS_TOKEN }}" \ - -H "Content-Type: application/json" \ - -d "{ \"data\": { \"name\": \"$task_name\" }}" \ - | jq -r .data.new_task.gid)" - echo "marketing_version=${version}" >> $GITHUB_OUTPUT - echo "asana_task_id=${asana_task_id}" >> $GITHUB_OUTPUT - echo "asana_task_url=https://app.asana.com/0/0/${asana_task_id}/f" >> $GITHUB_OUTPUT - - curl -fLSs -X POST "https://app.asana.com/api/1.0/sections/${{ vars.MACOS_APP_DEVELOPMENT_RELEASE_SECTION_ID }}/addTask" \ - -H "Authorization: Bearer ${{ env.ASANA_ACCESS_TOKEN }}" \ - -H "Content-Type: application/json" \ - --output /dev/null \ - -d "{\"data\": {\"task\": \"${asana_task_id}\"}}" - - assignee_id="$(curl -fLSs https://raw.githubusercontent.com/duckduckgo/BrowserServicesKit/main/.github/actions/asana-failed-pr-checks/user_ids.json \ - | jq -r .${{ github.actor }})" - - curl -fLSs -X PUT "https://app.asana.com/api/1.0/tasks/${asana_task_id}" \ - -H "Authorization: Bearer ${{ env.ASANA_ACCESS_TOKEN }}" \ - -H "Content-Type: application/json" \ - --output /dev/null \ - -d "{ \"data\": { \"assignee\": \"$assignee_id\" }}" + bundle exec fastlane run start_new_release \ + platform:"macos" \ + version:"$last_release" \ + github_handle:"${{ github.actor }}" \ + target_section_id:"1206716192269178" \ + is_hotfix:true - name: Report success env: diff --git a/Gemfile.lock b/Gemfile.lock index 2b4bd6daaa..e31ab6a993 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,9 +1,9 @@ GIT remote: https://github.com/duckduckgo/fastlane-plugin-ddg_apple_automation - revision: 466fef65f4e8e8a6a215cba72edabf48fb9e6a33 - tag: 0.11.6 + revision: 1299996ceabad1aa6e5ede660e5e3b7b436908f9 + branch: kieran/hotfix-release specs: - fastlane-plugin-ddg_apple_automation (0.11.6) + fastlane-plugin-ddg_apple_automation (0.11.8) asana climate_control httpparty @@ -27,16 +27,16 @@ GEM oauth2 (>= 1.4, < 3) atomos (0.1.3) aws-eventstream (1.3.0) - aws-partitions (1.1009.0) + aws-partitions (1.1011.0) aws-sdk-core (3.213.0) aws-eventstream (~> 1, >= 1.3.0) aws-partitions (~> 1, >= 1.992.0) aws-sigv4 (~> 1.9) jmespath (~> 1, >= 1.6.1) - aws-sdk-kms (1.95.0) + aws-sdk-kms (1.96.0) aws-sdk-core (~> 3, >= 3.210.0) aws-sigv4 (~> 1.5) - aws-sdk-s3 (1.171.0) + aws-sdk-s3 (1.172.0) aws-sdk-core (~> 3, >= 3.210.0) aws-sdk-kms (~> 1) aws-sigv4 (~> 1.5) diff --git a/fastlane/Pluginfile b/fastlane/Pluginfile index c4c65216d1..bcdacc40b2 100644 --- a/fastlane/Pluginfile +++ b/fastlane/Pluginfile @@ -2,4 +2,4 @@ # # Ensure this file is checked in to source control! -gem 'fastlane-plugin-ddg_apple_automation', git: 'https://github.com/duckduckgo/fastlane-plugin-ddg_apple_automation', tag: '0.11.6' +gem 'fastlane-plugin-ddg_apple_automation', git: 'https://github.com/duckduckgo/fastlane-plugin-ddg_apple_automation', branch: "kieran/hotfix-release"