Skip to content

Commit

Permalink
Add release action
Browse files Browse the repository at this point in the history
  • Loading branch information
stephencelis committed Mar 31, 2023
1 parent 5d92962 commit 2f4f040
Showing 1 changed file with 83 additions and 0 deletions.
83 changes: 83 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
name: Release
on:
release:
types: [published]
workflow_dispatch:
jobs:
project-channel:
runs-on: ubuntu-latest
steps:
- name: Dump Github context
env:
GITHUB_CONTEXT: ${{ toJSON(github) }}
run: echo "$GITHUB_CONTEXT"
- name: Slack Notification on SUCCESS
if: success()
uses: tokorom/action-slack-incoming-webhook@main
env:
INCOMING_WEBHOOK_URL: ${{ secrets.SLACK_PROJECT_CHANNEL_WEBHOOK_URL }}
with:
text: swift-url-routing ${{ github.event.release.tag_name }} has been released.
blocks: |
[
{
"type": "header",
"text": {
"type": "plain_text",
"text": "swift-url-routing ${{ github.event.release.tag_name}}"
}
},
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": ${{ toJSON(github.event.release.body) }}
}
},
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "${{ github.event.release.html_url }}"
}
}
]
releases-channel:
runs-on: ubuntu-latest
steps:
- name: Dump Github context
env:
GITHUB_CONTEXT: ${{ toJSON(github) }}
run: echo "$GITHUB_CONTEXT"
- name: Slack Notification on SUCCESS
if: success()
uses: tokorom/action-slack-incoming-webhook@main
env:
INCOMING_WEBHOOK_URL: ${{ secrets.SLACK_RELEASES_WEBHOOK_URL }}
with:
text: swift-url-routing ${{ github.event.release.tag_name }} has been released.
blocks: |
[
{
"type": "header",
"text": {
"type": "plain_text",
"text": "swift-url-routing ${{ github.event.release.tag_name}}"
}
},
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": ${{ toJSON(github.event.release.body) }}
}
},
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "${{ github.event.release.html_url }}"
}
}
]

0 comments on commit 2f4f040

Please sign in to comment.