Skip to content

Commit

Permalink
Add release workflow.
Browse files Browse the repository at this point in the history
  • Loading branch information
mbrandonw committed Feb 16, 2023
1 parent d46bc92 commit 3c4eea8
Showing 1 changed file with 82 additions and 0 deletions.
82 changes: 82 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
name: Release
on:
release:
types: [published]
workflow_dispatch:
jobs:
release-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-case-paths ${{ github.event.release.tag_name }} has been released.
blocks: |
[
{
"type": "header",
"text": {
"type": "plain_text",
"text": "swift-case-paths ${{ 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 }}"
}
}
]
release-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-case-paths ${{ github.event.release.tag_name }} has been released.
blocks: |
[
{
"type": "header",
"text": {
"type": "plain_text",
"text": "swift-case-paths ${{ 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 3c4eea8

Please sign in to comment.