@twilio-paste/[email protected] #1155
Workflow file for this run
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
name: On Release Publish | |
on: | |
release: | |
types: [published] | |
jobs: | |
slack-notifications: | |
runs-on: ubuntu-latest | |
name: Sends a message to Slack when a package is released | |
steps: | |
- uses: actions/checkout@v3 | |
- run: | | |
echo "${{ github.event.release.tag_name }}" | |
echo "${{ github.event.release.name }}" | |
echo "${{ github.event.release.body }}" | |
- name: Send message to Slack API | |
uses: archive/github-actions-slack@master | |
id: send-message | |
with: | |
slack-function: send-message | |
slack-bot-user-oauth-access-token: ${{ secrets.SLACK_BOT_USER_OAUTH_ACCESS_TOKEN }} | |
slack-channel: ${{ secrets.SLACK_RELEASE_CHANNEL_ID }} | |
slack-text: ${{ github.event.release.tag_name }} has been released. | |
- name: Result from "Send Message" | |
run: echo "The result was ${{ steps.notify.outputs.slack-result }}" | |
- name: Send Thread Message | |
uses: archive/github-actions-slack@master | |
with: | |
slack-function: send-message | |
slack-bot-user-oauth-access-token: ${{ secrets.SLACK_BOT_USER_OAUTH_ACCESS_TOKEN }} | |
slack-channel: ${{ fromJson(steps.send-message.outputs.slack-result).response.channel }} | |
slack-optional-thread_ts: ${{ fromJson(steps.send-message.outputs.slack-result).response.message.ts }} | |
slack-text: ${{ github.event.release.body }} | |
- name: Send "Send Thread Message" Result | |
run: echo "Data - ${{ steps.send-message.outputs.slack-result }}" |