-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for public and hotfix releases in Tag Release workflow (#…
…2246) Task/Issue URL: https://app.asana.com/0/1199230911884351/1206628689034178/f Description: This change renames tag_and_merge.yml workflow to tag_release.yml and updates it to handle public releases (regular as well as hotfixes). For public releases, tag_release deletes the release branch instead of merging it to the base branch. publish_dmg_release workflow calls tag_release for non-internal releases prior to publishing. New Asana comments and templates were added to inform release DRI about the progress and issues.
- Loading branch information
Showing
14 changed files
with
212 additions
and
28 deletions.
There are no files selected for viewing
File renamed without changes.
15 changes: 15 additions & 0 deletions
15
.github/actions/asana-add-comment/templates/public-release-tag-failed.yml
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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
data: | ||
html_text: | | ||
<body> | ||
<h2>[ACTION NEEDED] Failed to publish ${TAG} release – tagging failed</h2> | ||
<ul> | ||
<li><b>❗️ Tagging repository with ${TAG} tag failed.</b></li> | ||
<li><b>⚠️ GitHub release creation was skipped.</b></li> | ||
<li><b>⚠️ Deleting <code>${BRANCH}</code> was skipped.</b></li> | ||
</ul> | ||
<a data-asana-gid='${ASSIGNEE_ID}'/>, please proceed with the release <a data-asana-gid='${TASK_ID}' data-asana-dynamic='false'>according to instructions</a>. | ||
🔗 Workflow URL: <a href='${WORKFLOW_URL}'>${WORKFLOW_URL}</a>. | ||
</body> |
16 changes: 16 additions & 0 deletions
16
.github/actions/asana-add-comment/templates/public-release-tagged-delete-branch-failed.yml
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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
data: | ||
# yq -o=j | sed -E 's/\\n( *)([^\\n])/\2/g' | ||
html_text: | | ||
<body> | ||
<h2>[ACTION NEEDED] Public release ${TAG} tagged</h2> | ||
<ul> | ||
<li>🏷️ Repository is tagged with <code>${TAG}</code> tag.</li> | ||
<li>🚢 GitHub <a href='${RELEASE_URL}'>${TAG} release</a> is created.</li> | ||
<li><b>❗️ Deleting <code>${BRANCH}</code> failed.</b> | ||
<ul> | ||
<li><a data-asana-gid='${ASSIGNEE_ID}'/>, please proceed with deleting the branch manually <a data-asana-gid='${TASK_ID}' data-asana-dynamic='false'>according to instructions</a>.</li> | ||
</ul></li> | ||
</ul> | ||
🔗 Workflow URL: <a href='${WORKFLOW_URL}'>${WORKFLOW_URL}</a>. | ||
</body> |
15 changes: 15 additions & 0 deletions
15
.github/actions/asana-add-comment/templates/public-release-tagged.yml
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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
data: | ||
# yq -o=j | sed -E 's/\\n( *)([^\\n])/\2/g' | ||
html_text: | | ||
<body> | ||
<h2>Public release ${TAG} has been tagged ✅</h2> | ||
<ul> | ||
<li>📥 DMG is available from <a href='${DMG_URL}'>${DMG_URL}</a>.</li> | ||
<li>🏷️ Repository is tagged with <code>${TAG}</code> tag.</li> | ||
<li>🚢 GitHub <a href='${RELEASE_URL}'>${TAG} release</a> is created.</li> | ||
<li>🔱 <code>${BRANCH}</code> branch has been deleted.</li> | ||
<li>🚀 The relase will be published to Sparkle in a few minutes (you'll get notified).</li> | ||
</ul> | ||
🔗 Workflow URL: <a href='${WORKFLOW_URL}'>${WORKFLOW_URL}</a>. | ||
</body> |
15 changes: 15 additions & 0 deletions
15
.github/actions/asana-create-action-item/templates/delete-branch-failed.yml
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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
data: | ||
name: Delete ${BRANCH} branch | ||
assignee: "${ASSIGNEE_ID}" | ||
html_notes: | | ||
<body> | ||
The <code>${TAG}</code> public release has been successfully tagged and published in GitHub releases, | ||
but deleting <code>${BRANCH}</code> branch failed. Please delete it manually: | ||
<ul> | ||
<li><code>git push origin --delete ${BRANCH}</code></li> | ||
</ul> | ||
Complete this task when ready, or if the release branch has already been deleted. | ||
🔗 Workflow URL: <a href='${WORKFLOW_URL}'>${WORKFLOW_URL}</a>. | ||
</body> |
2 changes: 1 addition & 1 deletion
2
...eate-action-item/templates/tag-failed.yml → ...templates/internal-release-tag-failed.yml
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
2 changes: 1 addition & 1 deletion
2
.github/actions/asana-create-action-item/templates/merge-failed.yml
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
38 changes: 38 additions & 0 deletions
38
.github/actions/asana-create-action-item/templates/public-release-tag-failed.yml
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 |
---|---|---|
@@ -0,0 +1,38 @@ | ||
data: | ||
name: Tag ${BRANCH} branch, delete it, and create GitHub release | ||
assignee: "${ASSIGNEE_ID}" | ||
html_notes: | | ||
<body> | ||
Failed to tag the release with <code>${TAG}</code> tag. | ||
Please follow instructions below to tag the branch, make GitHub release and delete the release branch manually. | ||
<ul> | ||
<li>If the tag has already been created, please proceed with creating GitHub release and deleting the branch.</li> | ||
<li>If both tag and GitHub release have already been created, please close this task already.</li> | ||
</ul> | ||
Issue the following git commands to tag the release and delete the branch: | ||
<ul> | ||
<li><code>git fetch origin</code></li> | ||
<li><code>git checkout ${BRANCH}</code> switch to the release branch</li> | ||
<li><code>git pull origin ${BRANCH}</code> pull latest changes</li> | ||
<li><code>git tag ${TAG}</code> tag the release</li> | ||
<li><code>git push origin ${TAG}</code> push the tag</li> | ||
<li><code>git checkout ${BASE_BRANCH}</code> switch to ${BASE_BRANCH}</li> | ||
<li><code>git push origin --delete ${BRANCH}</code> delete the release branch</li> | ||
</ul> | ||
To create GitHub release: | ||
<ul> | ||
<li>Set up GH CLI if you haven't yet: <a data-asana-gid='1203791243007683'/></li> | ||
<li>Run the following command: | ||
<ul> | ||
<li><code>gh release create ${TAG} --generate-notes --latest --notes-start-tag ${LAST_RELEASE_TAG}</code></li> | ||
</ul></li> | ||
</ul> | ||
Complete this task when ready. | ||
🔗 Workflow URL: <a href='${WORKFLOW_URL}'>${WORKFLOW_URL}</a>. | ||
</body> |
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
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
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
Oops, something went wrong.