-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
14 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 "[email protected]" | ||
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: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters