Skip to content

Commit 0a7c661

Browse files
committed
Try GChat notification for VSCode RCs
1 parent 62048c6 commit 0a7c661

File tree

2 files changed

+78
-38
lines changed

2 files changed

+78
-38
lines changed

.github/workflows/build-vscode-extension.yml

+20-21
Original file line numberDiff line numberDiff line change
@@ -59,24 +59,23 @@ jobs:
5959
aws s3 cp ./vsix/$vsix_file s3://$AWS_S3_BUCKET/$s3_path/$vsix_file --no-progress
6060
echo "version=$base_version" >> $GITHUB_OUTPUT
6161
echo "s3_url=${DOWNLOAD_URL_ROOT}/$s3_path/$vsix_file" >> $GITHUB_OUTPUT
62-
- id: tools-team-slack
63-
if: ${{ inputs.dist == 'release' }}
64-
uses: slackapi/[email protected]
65-
env:
66-
SLACK_BOT_TOKEN: ${{ secrets.VMWARE_SLACK_BOT_TOKEN }}
67-
with:
68-
channel-id: "C0188MENU2J"
69-
payload: |
70-
{
71-
"text": "Release build `${{ inputs.extension-name }}-${{ steps.upload-release.outputs.version }}`",
72-
"blocks": [
73-
{
74-
"type": "section",
75-
"text": {
76-
"type": "mrkdwn",
77-
"text": "Release build for `${{ inputs.extension-name }}-${{ steps.upload-release.outputs.version }}` is available: ${{ steps.upload-release.outputs.s3_url }}"
78-
}
79-
}
80-
]
81-
}
82-
62+
# - id: tools-team-slack
63+
# if: ${{ inputs.dist == 'release' }}
64+
# uses: slackapi/[email protected]
65+
# env:
66+
# SLACK_BOT_TOKEN: ${{ secrets.VMWARE_SLACK_BOT_TOKEN }}
67+
# with:
68+
# channel-id: "C0188MENU2J"
69+
# payload: |
70+
# {
71+
# "text": "Release build `${{ inputs.extension-name }}-${{ steps.upload-release.outputs.version }}`",
72+
# "blocks": [
73+
# {
74+
# "type": "section",
75+
# "text": {
76+
# "type": "mrkdwn",
77+
# "text": "Release build for `${{ inputs.extension-name }}-${{ steps.upload-release.outputs.version }}` is available: ${{ steps.upload-release.outputs.s3_url }}"
78+
# }
79+
# }
80+
# ]
81+
# }

.github/workflows/release-vscode-extension.yml

+58-17
Original file line numberDiff line numberDiff line change
@@ -74,23 +74,64 @@ jobs:
7474
aws s3 rm s3://$AWS_S3_BUCKET/$s3_path/ --recursive
7575
aws s3 cp ./vsix/$vsix_file s3://$AWS_S3_BUCKET/$s3_path/${{ steps.version.outputs.release_name }}.vsix --no-progress
7676
echo "s3_url=${DOWNLOAD_URL_ROOT}/$s3_path/${{ steps.version.outputs.release_name }}.vsix" >> $GITHUB_OUTPUT
77-
- id: tools-team-slack
78-
uses: slackapi/[email protected]
79-
env:
80-
SLACK_BOT_TOKEN: ${{ secrets.VMWARE_SLACK_BOT_TOKEN }}
81-
with:
82-
channel-id: "C0188MENU2J"
83-
payload: |
84-
{
85-
"text": "Release build `${{ steps.version.outputs.release_name }}`",
86-
"blocks": [
87-
{
88-
"type": "section",
89-
"text": {
90-
"type": "mrkdwn",
91-
"text": "Release build for `${{ steps.version.outputs.release_name }}` is available: ${{ steps.upload-release.outputs.s3_url }}"
77+
# - id: tools-team-slack
78+
# uses: slackapi/[email protected]
79+
# env:
80+
# SLACK_BOT_TOKEN: ${{ secrets.VMWARE_SLACK_BOT_TOKEN }}
81+
# with:
82+
# channel-id: "C0188MENU2J"
83+
# payload: |
84+
# {
85+
# "text": "Release build `${{ steps.version.outputs.release_name }}`",
86+
# "blocks": [
87+
# {
88+
# "type": "section",
89+
# "text": {
90+
# "type": "mrkdwn",
91+
# "text": "Release build for `${{ steps.version.outputs.release_name }}` is available: ${{ steps.upload-release.outputs.s3_url }}"
92+
# }
93+
# }
94+
# ]
95+
# }
96+
- name: GChat spring-tools-team notification
97+
run: |
98+
curl --location --request POST '${{ secrets.TOOLS_TEAM_GCHAT_WEBHOOK_URL }}' \
99+
--header 'Content-Type: application/json' \
100+
--data-raw '{
101+
"cards": [
102+
{
103+
"header": {
104+
"title": "${{ inputs.extension-name }} ${{ steps.version.outputs.version }}",
105+
"subtitle": "Release Candidate ${{ inputs.postfix }}",
106+
"imageUrl": "https://code.visualstudio.com/assets/images/code-stable.png",
107+
"imageType": "CIRCLE"
108+
},
109+
"sections": [
110+
{
111+
"widgets": [
112+
{
113+
"textParagraph": {
114+
"text": "VSCode extension <b>${{ inputs.extension-name }}</b> release candidate build <b>${{ inputs.postfix }}</b> is available: <a href=${{ steps.upload-release.outputs.s3_url }}>${{ steps.version.outputs.release_name }}.vsix</a>"
115+
}
116+
},
117+
{
118+
"buttonList": {
119+
"buttons": [
120+
{
121+
"text": "Download VSIX",
122+
"onClick": {
123+
"openLink": {
124+
"url": "${{ steps.upload-release.outputs.s3_url }}"
125+
}
126+
}
127+
}
128+
]
129+
}
130+
}
131+
]
132+
}
133+
]
92134
}
93-
}
94135
]
95-
}
136+
}'
96137

0 commit comments

Comments
 (0)