Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 70 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,3 +87,73 @@ jobs:
files: dist/*
fail_on_unmatched_files: true
generate_release_notes: true
- name: Publish message to slack
uses: slackapi/[email protected]
if: success() && startsWith(github.ref, 'refs/tags/')
with:
webhook: ${{ secrets.SLACK_WEBHOOK_URL }}
webhook-type: incoming-webhook
payload: |
{
"blocks": [
{
"type": "header",
"text": {
"type": "plain_text",
"text": "✅ New codegen-sdk Release Successfully Published! 🚀",
"emoji": true
}
},
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "*Version:* ${{ github.ref_name }}\n*Released by:* <${{ github.server_url }}/${{ github.actor }}|@${{ github.actor }}>\n\n*Links:*\n• <${{ github.server_url }}/${{ github.repository }}/releases/tag/${{ github.ref_name }}|GitHub Release>\n• <https://pypi.org/project/codegen-sdk/${{ github.ref_name }}|PyPI Package>"
}
},
{
"type": "context",
"elements": [
{
"type": "mrkdwn",
"text": "<!date^${{ github.event.release.published_at }}^Published {date_num} at {time}|Published just now>"
}
]
}
]
}
- name: Publish failed message to slack
uses: slackapi/[email protected]
if: failure() && startsWith(github.ref, 'refs/tags/')
with:
webhook: ${{ secrets.SLACK_WEBHOOK_URL }}
webhook-type: incoming-webhook
payload: |
{
"blocks": [
{
"type": "header",
"text": {
"type": "plain_text",
"text": "❌ codegen-sdk Release Failed",
"emoji": true
}
},
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "*Version:* ${{ github.ref_name }}\n*Attempted by:* <${{ github.server_url }}/${{ github.actor }}|@${{ github.actor }}>\n\n*Details:*\n• Failed to publish version ${{ github.ref_name }}\n• <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|View workflow run>"
}
},
{
"type": "context",
"elements": [
{
"type": "mrkdwn",
"text": "Failed at <!date^${{ github.event.release.published_at }}^{date_num} {time}|just now>"
}
]
}
]
}
37 changes: 36 additions & 1 deletion .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ jobs:
# changing the following value will significantly affect github's cost. Be careful and consult with the team before changing it.
runs-on: ubuntu-latest-32
if: contains(github.event.pull_request.labels.*.name, 'parse-tests') || github.event_name == 'push' || github.event_name == 'workflow_dispatch'

environment: parse-tests
steps:
- uses: actions/checkout@v4
- name: Setup backend
Expand All @@ -121,6 +121,41 @@ jobs:
with:
flag: no-flag
codecov_token: ${{ secrets.CODECOV_TOKEN }}
- name: Notify parse tests failure
uses: slackapi/[email protected]
if: failure() && github.event_name == 'push' && false
with:
webhook: ${{ secrets.SLACK_WEBHOOK_URL }}
webhook-type: incoming-webhook
payload: |
{
"blocks": [
{
"type": "header",
"text": {
"type": "plain_text",
"text": "❌ Parse Tests Failed",
"emoji": true
}
},
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "*Branch:* ${{ github.ref_name }}\n*Triggered by:* <${{ github.server_url }}/${{ github.actor }}|@${{ github.actor }}>\n\n*Details:*\n• <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|View workflow run>"
}
},
{
"type": "context",
"elements": [
{
"type": "mrkdwn",
"text": "Failed at <!date^${{ github.event.head_commit.timestamp }}^{date_num} {time}|just now>"
}
]
}
]
}
# test_codemod_diffs:
# # changing the following value will significantly affect github's cost. Be careful and consult with the team before changing it.
# runs-on: ubuntu-latest-16
Expand Down
Loading