diff --git a/lib/fastlane/plugin/ddg_apple_automation/actions/asana_create_action_item_action.rb b/lib/fastlane/plugin/ddg_apple_automation/actions/asana_create_action_item_action.rb index f278ecc..60a8cbb 100644 --- a/lib/fastlane/plugin/ddg_apple_automation/actions/asana_create_action_item_action.rb +++ b/lib/fastlane/plugin/ddg_apple_automation/actions/asana_create_action_item_action.rb @@ -1,6 +1,7 @@ require "fastlane/action" require "fastlane_core/configuration/config_item" require "asana" +require "erb" require "yaml" require_relative "../helper/ddg_apple_automation_helper" require_relative "../helper/github_actions_helper" @@ -22,6 +23,7 @@ def self.run(params) template_name = params[:template_name] is_scheduled_release = params[:is_scheduled_release] github_handle = params[:github_handle] + args = (params[:template_args] || {}).merge(Hash(ENV).transform_keys(&:downcase)) task_id = Helper::DdgAppleAutomationHelper.extract_asana_task_id(task_url) automation_subtask_id = AsanaGetReleaseAutomationSubtaskIdAction.run(task_url: task_url, asana_access_token: token) @@ -38,10 +40,16 @@ def self.run(params) Helper::GitHubActionsHelper.set_output("asana_assignee_id", assignee_id) if template_name - template_file = Helper::DdgAppleAutomationHelper.path_for_asset_file("asana_create_action_item/templates/#{template_name}.yml") - template_content = YAML.safe_load(Helper::DdgAppleAutomationHelper.load_file(template_file)) - task_name = Helper::DdgAppleAutomationHelper.sanitize_html_and_replace_env_vars(template_content["name"]) - html_notes = Helper::DdgAppleAutomationHelper.sanitize_html_and_replace_env_vars(template_content["html_notes"]) + template_file = Helper::DdgAppleAutomationHelper.path_for_asset_file("asana_create_action_item/templates/#{template_name}.yml.erb") + template_content = Helper::DdgAppleAutomationHelper.load_file(template_file) + + erb_template = ERB.new(template_content) + yaml = erb_template.result(binding) + + task_data = YAML.safe_load(yaml) + + task_name = Helper::DdgAppleAutomationHelper.sanitize_html_and_replace_env_vars(task_data["name"]) + html_notes = Helper::DdgAppleAutomationHelper.sanitize_html_and_replace_env_vars(task_data["html_notes"]) end begin @@ -100,6 +108,11 @@ def self.available_options The file is processed before being sent to Asana", optional: true, type: String), + FastlaneCore::ConfigItem.new(key: :template_args, + description: "Template arguments. For backward compatibility, environment variables are added to this hash", + optional: true, + type: Hash, + default_value: {}), FastlaneCore::ConfigItem.new(key: :github_handle, description: "Github user handle", optional: true, diff --git a/lib/fastlane/plugin/ddg_apple_automation/assets/asana_create_action_item/templates/appcast-failed-hotfix.yml b/lib/fastlane/plugin/ddg_apple_automation/assets/asana_create_action_item/templates/appcast-failed-hotfix.yml.erb similarity index 67% rename from lib/fastlane/plugin/ddg_apple_automation/assets/asana_create_action_item/templates/appcast-failed-hotfix.yml rename to lib/fastlane/plugin/ddg_apple_automation/assets/asana_create_action_item/templates/appcast-failed-hotfix.yml.erb index 156eb68..8488df9 100644 --- a/lib/fastlane/plugin/ddg_apple_automation/assets/asana_create_action_item/templates/appcast-failed-hotfix.yml +++ b/lib/fastlane/plugin/ddg_apple_automation/assets/asana_create_action_item/templates/appcast-failed-hotfix.yml.erb @@ -1,7 +1,7 @@ -name: Generate appcast2.xml for ${TAG} hotfix release and upload assets to S3 +name: Generate appcast2.xml for <%= args['tag'] %> hotfix release and upload assets to S3 html_notes: | - Publishing ${TAG} hotfix release failed in CI. Please follow the steps to generate the appcast file and upload files to S3 from your local machine.
+ Publishing <%= args['tag'] %> hotfix release failed in CI. Please follow the steps to generate the appcast file and upload files to S3 from your local machine.
  1. Create a new file called release-notes.txt on your disk.
  2. Run appcastManager:
  3. Verify that the new build is in the appcast file with the latest release notes and no internal channel tag. The phased rollout tag should not be present:
  4. Run upload_to_s3.sh script:
When done, please verify that "Check for Updates" works correctly: @@ -25,9 +25,9 @@ html_notes: |
  • Launch a debug version of the app with an old version number.
  • Make sure you're not identified as an internal user in the app.
  • Go to Main Menu β†’ DuckDuckGo β†’ Check for Updates...
  • -
  • Verify that you're being offered to update to ${TAG}.
  • +
  • Verify that you're being offered to update to <%= args['tag'] %>.
  • Verify that the update works.

  • - πŸ”— Workflow URL: ${WORKFLOW_URL}. + πŸ”— Workflow URL: '><%= args['worklow_url'] %>. \ No newline at end of file diff --git a/lib/fastlane/plugin/ddg_apple_automation/assets/asana_create_action_item/templates/appcast-failed-internal.yml b/lib/fastlane/plugin/ddg_apple_automation/assets/asana_create_action_item/templates/appcast-failed-internal.yml.erb similarity index 64% rename from lib/fastlane/plugin/ddg_apple_automation/assets/asana_create_action_item/templates/appcast-failed-internal.yml rename to lib/fastlane/plugin/ddg_apple_automation/assets/asana_create_action_item/templates/appcast-failed-internal.yml.erb index 88908b3..07bbe2d 100644 --- a/lib/fastlane/plugin/ddg_apple_automation/assets/asana_create_action_item/templates/appcast-failed-internal.yml +++ b/lib/fastlane/plugin/ddg_apple_automation/assets/asana_create_action_item/templates/appcast-failed-internal.yml.erb @@ -1,16 +1,16 @@ -name: Generate appcast2.xml for ${TAG} internal release and upload assets to S3 +name: Generate appcast2.xml for <%= args['tag'] %> internal release and upload assets to S3 html_notes: | - Publishing ${TAG} internal release failed in CI. Please follow the steps to generate the appcast file and upload files to S3 from your local machine.
    + Publishing <%= args['tag'] %> internal release failed in CI. Please follow the steps to generate the appcast file and upload files to S3 from your local machine.
      -
    1. Download the DMG for ${TAG} release.
    2. +
    3. Download '>the DMG for <%= args['tag'] %> release.
    4. Create a new file called release-notes.txt on your disk.
    5. Run appcastManager:
    6. Verify that the new build is in the appcast file with the following internal channel tag:

    - πŸ”— Workflow URL: ${WORKFLOW_URL}. + πŸ”— Workflow URL: '><%= args['worklow_url'] %>. \ No newline at end of file diff --git a/lib/fastlane/plugin/ddg_apple_automation/assets/asana_create_action_item/templates/appcast-failed-public.yml b/lib/fastlane/plugin/ddg_apple_automation/assets/asana_create_action_item/templates/appcast-failed-public.yml.erb similarity index 67% rename from lib/fastlane/plugin/ddg_apple_automation/assets/asana_create_action_item/templates/appcast-failed-public.yml rename to lib/fastlane/plugin/ddg_apple_automation/assets/asana_create_action_item/templates/appcast-failed-public.yml.erb index ca4d4e2..5f98cd5 100644 --- a/lib/fastlane/plugin/ddg_apple_automation/assets/asana_create_action_item/templates/appcast-failed-public.yml +++ b/lib/fastlane/plugin/ddg_apple_automation/assets/asana_create_action_item/templates/appcast-failed-public.yml.erb @@ -1,7 +1,7 @@ -name: Generate appcast2.xml for ${TAG} public release and upload assets to S3 +name: Generate appcast2.xml for <%= args['tag'] %> public release and upload assets to S3 html_notes: | - Publishing ${TAG} release failed in CI. Please follow the steps to generate the appcast file and upload files to S3 from your local machine.
    + Publishing <%= args['tag'] %> release failed in CI. Please follow the steps to generate the appcast file and upload files to S3 from your local machine.
    1. Create a new file called release-notes.txt on your disk.
    2. Run appcastManager:
    3. Verify that the new build is in the appcast file with the latest release notes, the phased rollout tag (below) and no internal channel tag:
    4. Run upload_to_s3.sh script:
    When done, please verify that "Check for Updates" works correctly: @@ -25,8 +25,8 @@ html_notes: |
  • Launch a debug version of the app with an old version number.
  • Make sure you're not identified as an internal user in the app.
  • Go to Main Menu β†’ DuckDuckGo β†’ Check for Updates...
  • -
  • Verify that you're being offered to update to ${TAG}.
  • +
  • Verify that you're being offered to update to <%= args['tag'] %>.
  • Verify that the update works.

  • - πŸ”— Workflow URL: ${WORKFLOW_URL}. + πŸ”— Workflow URL: '><%= args['worklow_url'] %>. diff --git a/lib/fastlane/plugin/ddg_apple_automation/assets/asana_create_action_item/templates/delete-branch-failed.yml b/lib/fastlane/plugin/ddg_apple_automation/assets/asana_create_action_item/templates/delete-branch-failed.yml deleted file mode 100644 index 69d8440..0000000 --- a/lib/fastlane/plugin/ddg_apple_automation/assets/asana_create_action_item/templates/delete-branch-failed.yml +++ /dev/null @@ -1,12 +0,0 @@ -name: Delete ${BRANCH} branch -html_notes: | - - The ${TAG} public release has been successfully tagged and published in GitHub releases, - but deleting ${BRANCH} branch failed. Please delete it manually: - - Complete this task when ready, or if the release branch has already been deleted.
    -
    - πŸ”— Workflow URL: ${WORKFLOW_URL}. - diff --git a/lib/fastlane/plugin/ddg_apple_automation/assets/asana_create_action_item/templates/delete-branch-failed.yml.erb b/lib/fastlane/plugin/ddg_apple_automation/assets/asana_create_action_item/templates/delete-branch-failed.yml.erb new file mode 100644 index 0000000..9974cea --- /dev/null +++ b/lib/fastlane/plugin/ddg_apple_automation/assets/asana_create_action_item/templates/delete-branch-failed.yml.erb @@ -0,0 +1,12 @@ +name: Delete <%= args['branch'] %> branch +html_notes: | + + The <%= args['tag'] %> public release has been successfully tagged and published in GitHub releases, + but deleting <%= args['branch'] %> branch failed. Please delete it manually: + + Complete this task when ready, or if the release branch has already been deleted.
    +
    + πŸ”— Workflow URL: '><%= args['worklow_url'] %>. + diff --git a/lib/fastlane/plugin/ddg_apple_automation/assets/asana_create_action_item/templates/internal-release-tag-failed.yml b/lib/fastlane/plugin/ddg_apple_automation/assets/asana_create_action_item/templates/internal-release-tag-failed.yml deleted file mode 100644 index 9266785..0000000 --- a/lib/fastlane/plugin/ddg_apple_automation/assets/asana_create_action_item/templates/internal-release-tag-failed.yml +++ /dev/null @@ -1,39 +0,0 @@ -name: Tag ${BRANCH} branch and create GitHub release -html_notes: | - - Failed to tag the release with ${TAG} tag.
    - Please follow instructions below to tag the branch, make GitHub release and merge release branch to ${BASE_BRANCH} manually.
    -
    - Issue the following git commands to tag the release and merge the branch: -
    - To create GitHub release: -
    - Complete this task when ready and proceed with testing the build. If you're bumping an internal release, you should get another task asking you to publish the release in Sparkle. - Look for other tasks in
    task and handle them as needed.
    -
    - πŸ”— Workflow URL:
    ${WORKFLOW_URL}. - diff --git a/lib/fastlane/plugin/ddg_apple_automation/assets/asana_create_action_item/templates/internal-release-tag-failed.yml.erb b/lib/fastlane/plugin/ddg_apple_automation/assets/asana_create_action_item/templates/internal-release-tag-failed.yml.erb new file mode 100644 index 0000000..e486d44 --- /dev/null +++ b/lib/fastlane/plugin/ddg_apple_automation/assets/asana_create_action_item/templates/internal-release-tag-failed.yml.erb @@ -0,0 +1,39 @@ +name: Tag <%= args['branch'] %> branch and create GitHub release +html_notes: | + + Failed to tag the release with <%= args['tag'] %> tag.
    + Please follow instructions below to tag the branch, make GitHub release and merge release branch to <%= args['base_branch'] %> manually.
    +
    + Issue the following git commands to tag the release and merge the branch: +
    + To create GitHub release: +
    + Complete this task when ready and proceed with testing the build. If you're bumping an internal release, you should get another task asking you to publish the release in Sparkle. + Look for other tasks in
    '/> task and handle them as needed.
    +
    + πŸ”— Workflow URL:
    '><%= args['worklow_url'] %>. + diff --git a/lib/fastlane/plugin/ddg_apple_automation/assets/asana_create_action_item/templates/merge-failed.yml b/lib/fastlane/plugin/ddg_apple_automation/assets/asana_create_action_item/templates/merge-failed.yml deleted file mode 100644 index 87f016f..0000000 --- a/lib/fastlane/plugin/ddg_apple_automation/assets/asana_create_action_item/templates/merge-failed.yml +++ /dev/null @@ -1,28 +0,0 @@ -name: Merge ${BRANCH} to ${BASE_BRANCH} -html_notes: | - - The ${TAG} release has been successfully tagged and published in GitHub releases, - but merging to ${BASE_BRANCH} failed. Please resolve conflicts and merge ${BRANCH} to ${BASE_BRANCH} manually.
    -
    - Issue the following git commands: - - Complete this task when ready and proceed with testing the build.
    -
    - πŸ”— Workflow URL: ${WORKFLOW_URL}. - diff --git a/lib/fastlane/plugin/ddg_apple_automation/assets/asana_create_action_item/templates/merge-failed.yml.erb b/lib/fastlane/plugin/ddg_apple_automation/assets/asana_create_action_item/templates/merge-failed.yml.erb new file mode 100644 index 0000000..7cf1003 --- /dev/null +++ b/lib/fastlane/plugin/ddg_apple_automation/assets/asana_create_action_item/templates/merge-failed.yml.erb @@ -0,0 +1,28 @@ +name: Merge <%= args['branch'] %> to <%= args['base_branch'] %> +html_notes: | + + The <%= args['tag'] %> release has been successfully tagged and published in GitHub releases, + but merging to <%= args['base_branch'] %> failed. Please resolve conflicts and merge <%= args['branch'] %> to <%= args['base_branch'] %> manually.
    +
    + Issue the following git commands: + + Complete this task when ready and proceed with testing the build.
    +
    + πŸ”— Workflow URL: '><%= args['worklow_url'] %>. + diff --git a/lib/fastlane/plugin/ddg_apple_automation/assets/asana_create_action_item/templates/public-release-tag-failed.yml b/lib/fastlane/plugin/ddg_apple_automation/assets/asana_create_action_item/templates/public-release-tag-failed.yml deleted file mode 100644 index bbfb11c..0000000 --- a/lib/fastlane/plugin/ddg_apple_automation/assets/asana_create_action_item/templates/public-release-tag-failed.yml +++ /dev/null @@ -1,31 +0,0 @@ -name: Tag ${BRANCH} branch, delete it, and create GitHub release -html_notes: | - - Failed to tag the release with ${TAG} tag.
    - Please follow instructions below to tag the branch, make GitHub release and delete the release branch manually. -
    - Issue the following git commands to tag the release and delete the branch: -
    - To create GitHub release: -
    - Complete this task when ready.
    -
    - πŸ”— Workflow URL:
    ${WORKFLOW_URL}. - diff --git a/lib/fastlane/plugin/ddg_apple_automation/assets/asana_create_action_item/templates/public-release-tag-failed.yml.erb b/lib/fastlane/plugin/ddg_apple_automation/assets/asana_create_action_item/templates/public-release-tag-failed.yml.erb new file mode 100644 index 0000000..e93d860 --- /dev/null +++ b/lib/fastlane/plugin/ddg_apple_automation/assets/asana_create_action_item/templates/public-release-tag-failed.yml.erb @@ -0,0 +1,31 @@ +name: Tag <%= args['branch'] %> branch, delete it, and create GitHub release +html_notes: | + + Failed to tag the release with <%= args['tag'] %> tag.
    + Please follow instructions below to tag the branch, make GitHub release and delete the release branch manually. +
    + Issue the following git commands to tag the release and delete the branch: +
    + To create GitHub release: +
    + Complete this task when ready.
    +
    + πŸ”— Workflow URL:
    '><%= args['worklow_url'] %>. + diff --git a/lib/fastlane/plugin/ddg_apple_automation/assets/asana_create_action_item/templates/run-publish-dmg-release.yml b/lib/fastlane/plugin/ddg_apple_automation/assets/asana_create_action_item/templates/run-publish-dmg-release.yml.erb similarity index 75% rename from lib/fastlane/plugin/ddg_apple_automation/assets/asana_create_action_item/templates/run-publish-dmg-release.yml rename to lib/fastlane/plugin/ddg_apple_automation/assets/asana_create_action_item/templates/run-publish-dmg-release.yml.erb index f337159..801e703 100644 --- a/lib/fastlane/plugin/ddg_apple_automation/assets/asana_create_action_item/templates/run-publish-dmg-release.yml +++ b/lib/fastlane/plugin/ddg_apple_automation/assets/asana_create_action_item/templates/run-publish-dmg-release.yml.erb @@ -4,15 +4,15 @@ html_notes: |

    Using GH CLI

    Run the following command:

    - gh workflow run publish_dmg_release.yml --ref ${BRANCH} -f asana-task-url=${ASANA_TASK_URL} -f tag=${TAG} -f release-type=internal + gh workflow run publish_dmg_release.yml --ref <%= args['branch'] %> -f asana-task-url=<%= args['asana_task_url'] %> -f tag=<%= args['tag'] %> -f release-type=internal

    Using GitHub web UI

    1. Open Publish DMG Release workflow page.
    2. Click "Run Workflow" and fill in the form as follows:

    @@ -28,5 +28,5 @@ html_notes: |
    Complete this task when ready and proceed with testing the build. If GitHub Actions is unavailable, you'll find manual instructions in the Run Publish DMG Release GitHub Actions workflow subtask of Make Internal Release task.

    - πŸ”— Workflow URL: ${WORKFLOW_URL}. + πŸ”— Workflow URL: '><%= args['workflow_url'] %>. diff --git a/lib/fastlane/plugin/ddg_apple_automation/assets/asana_create_action_item/templates/update-asana-for-public-release.yml b/lib/fastlane/plugin/ddg_apple_automation/assets/asana_create_action_item/templates/update-asana-for-public-release.yml.erb similarity index 75% rename from lib/fastlane/plugin/ddg_apple_automation/assets/asana_create_action_item/templates/update-asana-for-public-release.yml rename to lib/fastlane/plugin/ddg_apple_automation/assets/asana_create_action_item/templates/update-asana-for-public-release.yml.erb index 8cbd68c..6e15e62 100644 --- a/lib/fastlane/plugin/ddg_apple_automation/assets/asana_create_action_item/templates/update-asana-for-public-release.yml +++ b/lib/fastlane/plugin/ddg_apple_automation/assets/asana_create_action_item/templates/update-asana-for-public-release.yml.erb @@ -3,7 +3,7 @@ html_notes: | Automation failed to update Asana for the public release. Please follow the steps below.
      -
    1. Open and select the List view
    2. +
    3. Open '/> and select the List view
    4. Scroll to the "Validation" section.
    5. Select all the tasks in that section.
    6. Drag and drop all the selected tasks to the "Done" section
    7. @@ -11,5 +11,5 @@ html_notes: |

    Complete this task when ready.

    - πŸ”— Workflow URL:
    ${WORKFLOW_URL}. + πŸ”— Workflow URL: '><%= args['workflow_url'] %>. diff --git a/lib/fastlane/plugin/ddg_apple_automation/assets/asana_create_action_item/templates/validate-check-for-updates-internal.yml b/lib/fastlane/plugin/ddg_apple_automation/assets/asana_create_action_item/templates/validate-check-for-updates-internal.yml deleted file mode 100644 index d114a6d..0000000 --- a/lib/fastlane/plugin/ddg_apple_automation/assets/asana_create_action_item/templates/validate-check-for-updates-internal.yml +++ /dev/null @@ -1,37 +0,0 @@ -name: Validate that 'Check For Updates' upgrades to ${TAG} for internal users -html_notes: | - -

    Build ${TAG} has been released internally via Sparkle πŸŽ‰

    - Please verify that "Check for Updates" works correctly: -
      -
    1. Launch a debug version of the app with an old version number.
    2. -
    3. Identify as an internal user in the app.
    4. -
    5. Go to Main Menu β†’ DuckDuckGo β†’ Check for Updates...
    6. -
    7. Verify that you're being offered to update to ${TAG}.
    8. -
    9. Verify that the update works.
    10. -
    -

    🚨In case "Check for Updates" is broken

    - You can restore previous version of the appcast2.xml: -
      -
    1. Download the ${OLD_APPCAST_NAME} file attached to this task.
    2. -
    3. Log in to AWS session: -
    4. -
    5. Overwrite appcast2.xml with the old version: -
    6. -

    -
    -

    Summary of automated changes

    -

    Changes to appcast2.xml

    - See the attached ${APPCAST_PATCH_NAME} file. -

    Release notes

    - See the attached ${RELEASE_NOTES_FILE} file for release notes extracted automatically from the release task description. -

    List of files uploaded to S3

    -
      - ${FILES_UPLOADED} -

    - πŸ”— Workflow URL: ${WORKFLOW_URL}. - diff --git a/lib/fastlane/plugin/ddg_apple_automation/assets/asana_create_action_item/templates/validate-check-for-updates-internal.yml.erb b/lib/fastlane/plugin/ddg_apple_automation/assets/asana_create_action_item/templates/validate-check-for-updates-internal.yml.erb new file mode 100644 index 0000000..c256a0c --- /dev/null +++ b/lib/fastlane/plugin/ddg_apple_automation/assets/asana_create_action_item/templates/validate-check-for-updates-internal.yml.erb @@ -0,0 +1,37 @@ +name: Validate that 'Check For Updates' upgrades to <%= args['tag'] %> for internal users +html_notes: | + +

    Build <%= args['tag'] %> has been released internally via Sparkle πŸŽ‰

    + Please verify that "Check for Updates" works correctly: +
      +
    1. Launch a debug version of the app with an old version number.
    2. +
    3. Identify as an internal user in the app.
    4. +
    5. Go to Main Menu β†’ DuckDuckGo β†’ Check for Updates...
    6. +
    7. Verify that you're being offered to update to <%= args['tag'] %>.
    8. +
    9. Verify that the update works.
    10. +
    +

    🚨In case "Check for Updates" is broken

    + You can restore previous version of the appcast2.xml: +
      +
    1. Download the <%= args['old_appcast_name'] %> file attached to this task.
    2. +
    3. Log in to AWS session: +
    4. +
    5. Overwrite appcast2.xml with the old version: +
    6. +

    +
    +

    Summary of automated changes

    +

    Changes to appcast2.xml

    + See the attached <%= args['appcast_patch_name'] %> file. +

    Release notes

    + See the attached <%= args['release_notes_file'] %> file for release notes extracted automatically from ' data-asana-dynamic='false'>the release task description. +

    List of files uploaded to S3

    +
      + <%= args['files_uploaded'] %> +

    + πŸ”— Workflow URL: '><%= args['workflow_url'] %>. + diff --git a/lib/fastlane/plugin/ddg_apple_automation/assets/asana_create_action_item/templates/validate-check-for-updates-public.yml b/lib/fastlane/plugin/ddg_apple_automation/assets/asana_create_action_item/templates/validate-check-for-updates-public.yml deleted file mode 100644 index 2cdad74..0000000 --- a/lib/fastlane/plugin/ddg_apple_automation/assets/asana_create_action_item/templates/validate-check-for-updates-public.yml +++ /dev/null @@ -1,37 +0,0 @@ -name: Validate that 'Check For Updates' upgrades to ${TAG} -html_notes: | - -

    Build ${TAG} has been released publicly via Sparkle πŸŽ‰

    - Please verify that "Check for Updates" works correctly: -
      -
    1. Launch a debug version of the app with an old version number.
    2. -
    3. Make sure you're not identified as an internal user in the app.
    4. -
    5. Go to Main Menu β†’ DuckDuckGo β†’ Check for Updates...
    6. -
    7. Verify that you're being offered to update to ${TAG}.
    8. -
    9. Verify that the update works.
    10. -
    -

    🚨In case "Check for Updates" is broken

    - You can restore previous version of the appcast2.xml: -
      -
    1. Download the ${OLD_APPCAST_NAME} file attached to this task.
    2. -
    3. Log in to AWS session: -
    4. -
    5. Overwrite appcast2.xml with the old version: -
    6. -

    -
    -

    Summary of automated changes

    -

    Changes to appcast2.xml

    - See the attached ${APPCAST_PATCH_NAME} file. -

    Release notes

    - See the attached ${RELEASE_NOTES_FILE} file for release notes extracted automatically from the release task description. -

    List of files uploaded to S3

    -
      - ${FILES_UPLOADED} -

    - πŸ”— Workflow URL: ${WORKFLOW_URL}. - diff --git a/lib/fastlane/plugin/ddg_apple_automation/assets/asana_create_action_item/templates/validate-check-for-updates-public.yml.erb b/lib/fastlane/plugin/ddg_apple_automation/assets/asana_create_action_item/templates/validate-check-for-updates-public.yml.erb new file mode 100644 index 0000000..6f93b13 --- /dev/null +++ b/lib/fastlane/plugin/ddg_apple_automation/assets/asana_create_action_item/templates/validate-check-for-updates-public.yml.erb @@ -0,0 +1,37 @@ +name: Validate that 'Check For Updates' upgrades to <%= args['tag'] %> +html_notes: | + +

    Build <%= args['tag'] %> has been released publicly via Sparkle πŸŽ‰

    + Please verify that "Check for Updates" works correctly: +
      +
    1. Launch a debug version of the app with an old version number.
    2. +
    3. Make sure you're not identified as an internal user in the app.
    4. +
    5. Go to Main Menu β†’ DuckDuckGo β†’ Check for Updates...
    6. +
    7. Verify that you're being offered to update to <%= args['tag'] %>.
    8. +
    9. Verify that the update works.
    10. +
    +

    🚨In case "Check for Updates" is broken

    + You can restore previous version of the appcast2.xml: +
      +
    1. Download the <%= args['old_appcast_name'] %> file attached to this task.
    2. +
    3. Log in to AWS session: +
    4. +
    5. Overwrite appcast2.xml with the old version: +
    6. +

    +
    +

    Summary of automated changes

    +

    Changes to appcast2.xml

    + See the attached <%= args['appcast_patch_name'] %> file. +

    Release notes

    + See the attached <%= args['release_notes_file'] %> file for release notes extracted automatically from ' data-asana-dynamic='false'>the release task description. +

    List of files uploaded to S3

    +
      + <%= args['files_uploaded'] %> +

    + πŸ”— Workflow URL: '><%= args['workflow_url'] %>. + diff --git a/spec/asana_create_action_item_action_spec.rb b/spec/asana_create_action_item_action_spec.rb index ced0800..e4a2575 100644 --- a/spec/asana_create_action_item_action_spec.rb +++ b/spec/asana_create_action_item_action_spec.rb @@ -72,6 +72,7 @@ it "correctly builds payload if template_name input is given" do allow(File).to receive(:read) allow(YAML).to receive(:safe_load).and_return(parsed_yaml_content) + allow(ERB).to receive(:new).and_return(double('erb', result: "yaml")) test_action(task_url: task_url, task_name: task_name, template_name: "template_name", is_scheduled_release: true) expect(@asana_client_tasks).to have_received(:create_subtask_for_task).with( task_gid: automation_subtask_id,