diff --git a/.github/actions/asana-create-action-item/action.yml b/.github/actions/asana-create-action-item/action.yml index 3a3092d1bc..c9ffb1b088 100644 --- a/.github/actions/asana-create-action-item/action.yml +++ b/.github/actions/asana-create-action-item/action.yml @@ -48,7 +48,9 @@ runs: shell: bash env: ASSIGNEE_ID: ${{ steps.get-automation-subtask.outputs.assignee-id }} + AUTOMATION_TASK_ID: ${{ steps.get-automation-subtask.outputs.automation-task-id }} TEMPLATE_PATH: ${{ github.action_path }}/templates/${{ inputs.template-name }}.yml + WORKFLOW_URL: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} run: | if [ ! -f $TEMPLATE_PATH ]; then echo "::error::Template file not found at $TEMPLATE_PATH" @@ -64,6 +66,7 @@ runs: shell: bash env: ASSIGNEE_ID: ${{ steps.get-automation-subtask.outputs.assignee-id }} + AUTOMATION_TASK_ID: ${{ steps.get-automation-subtask.outputs.automation-task-id }} NOTES: ${{ inputs.notes }} TASK_NAME: ${{ inputs.task-name }} WORKFLOW_URL: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} @@ -76,6 +79,7 @@ runs: shell: bash env: ASSIGNEE_ID: ${{ steps.get-automation-subtask.outputs.assignee-id }} + AUTOMATION_TASK_ID: ${{ steps.get-automation-subtask.outputs.automation-task-id }} HTML_NOTES: ${{ inputs.html-notes }} TASK_NAME: ${{ inputs.task-name }} WORKFLOW_URL: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} diff --git a/.github/actions/asana-create-action-item/templates/merge-failed.yml b/.github/actions/asana-create-action-item/templates/merge-failed.yml index db6e4c8aa7..c38617995d 100644 --- a/.github/actions/asana-create-action-item/templates/merge-failed.yml +++ b/.github/actions/asana-create-action-item/templates/merge-failed.yml @@ -25,7 +25,8 @@ data:
  • git push origin ${BASE_BRANCH} push merged branch
  • - Complete this task when ready and proceed with testing the build. + 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/.github/actions/asana-create-action-item/templates/run-publish-dmg-release.yml b/.github/actions/asana-create-action-item/templates/run-publish-dmg-release.yml new file mode 100644 index 0000000000..a154f26cc6 --- /dev/null +++ b/.github/actions/asana-create-action-item/templates/run-publish-dmg-release.yml @@ -0,0 +1,38 @@ +data: + name: Run Publish DMG Release GitHub Actions workflow + assignee: "${ASSIGNEE_ID}" + 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 +

    Using GitHub web UI

    +
      +
    1. Open Publish DMG Release workflow page.
    2. +
    3. Click "Run Workflow" and fill in the form as follows: +
    4. +
    + + The GitHub Action workflow does the following: + + + 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}. + diff --git a/.github/workflows/bump_internal_release.yml b/.github/workflows/bump_internal_release.yml index c3d8017985..797871effd 100644 --- a/.github/workflows/bump_internal_release.yml +++ b/.github/workflows/bump_internal_release.yml @@ -120,6 +120,7 @@ jobs: branch: ${{ github.ref_name }} base-branch: ${{ github.event.inputs.base-branch || 'main' }} prerelease: true + internal-release-bump: true secrets: ASANA_ACCESS_TOKEN: ${{ secrets.ASANA_ACCESS_TOKEN }} GHA_ELEVATED_PERMISSIONS_TOKEN: ${{ secrets.GHA_ELEVATED_PERMISSIONS_TOKEN }} diff --git a/.github/workflows/tag_release.yml b/.github/workflows/tag_release.yml index fb63c6c3e8..f514bcbc2f 100644 --- a/.github/workflows/tag_release.yml +++ b/.github/workflows/tag_release.yml @@ -37,6 +37,11 @@ on: description: "Is this a pre-release? (a.k.a. internal release)" required: true type: boolean + internal-release-bump: + description: "Is this an internal release bump? (the subsequent internal release of the current week)" + required: false + default: false + type: boolean secrets: ASANA_ACCESS_TOKEN: required: true @@ -57,6 +62,7 @@ jobs: BASE_BRANCH: ${{ inputs.base-branch || 'main' }} BRANCH: ${{ inputs.branch || github.ref_name }} prerelease: ${{ github.event.inputs.prerelease || inputs.prerelease }} + internal-release-bump: ${{ inputs.internal-release-bump }} outputs: tag: ${{ steps.create-tag.outputs.tag }} @@ -150,6 +156,9 @@ jobs: if [[ "${prerelease}" == "true" ]]; then echo "task-template=merge-failed" >> $GITHUB_OUTPUT echo "comment-template=internal-release-ready-merge-failed" >> $GITHUB_OUTPUT + if [[ "${internal-release-bump}" == "true" ]]; then + echo "extra-task-template=run-publish-dmg-release" >> $GITHUB_OUTPUT + fi else echo "task-template=delete-branch-failed" >> $GITHUB_OUTPUT echo "comment-template=public-release-tagged-delete-branch-failed" >> $GITHUB_OUTPUT @@ -158,6 +167,9 @@ jobs: if [[ "${prerelease}" == "true" ]]; then echo "task-template=internal-release-tag-failed" >> $GITHUB_OUTPUT echo "comment-template=internal-release-ready-tag-failed" >> $GITHUB_OUTPUT + if [[ "${internal-release-bump}" == "true" ]]; then + echo "extra-task-template=run-publish-dmg-release" >> $GITHUB_OUTPUT + fi else echo "task-template=public-release-tag-failed" >> $GITHUB_OUTPUT echo "comment-template=public-release-tag-failed" >> $GITHUB_OUTPUT @@ -173,6 +185,17 @@ jobs: release-task-url: ${{ env.asana-task-url }} template-name: ${{ steps.asana-failure-templates.outputs.task-template }} + - name: Create Publish DMG Release task on failure + id: create-publish-dmg-task-on-failure + if: (failure() || env.MERGE_OR_DELETE_FAILED == 'true') && env.internal-release-bump == 'true' + uses: ./.github/actions/asana-create-action-item + env: + ASANA_TASK_URL: ${{ env.asana-task-url }} + with: + access-token: ${{ secrets.ASANA_ACCESS_TOKEN }} + release-task-url: ${{ env.asana-task-url }} + template-name: ${{ steps.asana-failure-templates.outputs.extra-task-template }} + - name: Report failure if: failure() || env.MERGE_OR_DELETE_FAILED == 'true' uses: ./.github/actions/asana-log-message