diff --git a/.github/actions/slack-notification/action.yml b/.github/actions/slack-notification/action.yml index 54019b70..1d65c656 100644 --- a/.github/actions/slack-notification/action.yml +++ b/.github/actions/slack-notification/action.yml @@ -16,9 +16,10 @@ runs: using: "composite" steps: - name: Send Slack notification - uses: slackapi/slack-github-action@485a9d42d3a73031f12ec201c457e2162c45d02d # v2 + uses: slackapi/slack-github-action@485a9d42d3a73031f12ec201c457e2162c45d02d #v2 with: - channel-id: ${{ inputs.channel-id }} - slack-message: ${{ inputs.message }} - env: - SLACK_BOT_TOKEN: ${{ inputs.bot-token }} \ No newline at end of file + method: chat.postMessage + token: ${{ inputs.bot-token }} + payload: | + channel: "${{ inputs.channel-id }}" + text: "${{ inputs.message }}" \ No newline at end of file diff --git a/.github/workflows/send-a-slack-message.yml b/.github/workflows/send-a-slack-message.yml new file mode 100644 index 00000000..10717142 --- /dev/null +++ b/.github/workflows/send-a-slack-message.yml @@ -0,0 +1,29 @@ +name: Send a Slack Message + +on: + pull_request: + branches: [master, release/*] + +jobs: + releases: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + + - name: Setup Node.js + uses: actions/setup-node@v2 + with: + node-version: "16" + + - name: Send Slack Notification + if: success() + uses: ./.github/actions/slack-notification + with: + channel-id: ${{ secrets.SLACK_CHANNEL_ID }} + bot-token: ${{ secrets.SLACK_BOT_TOKEN }} + message: | + 🚀 *New Native Template Version Released* + + A new version of Native Template has been released with updated version compatibility information. + + Please review the PR for more details: ${{ github.server_url }}/${{ github.repository }}/pull/${{ steps.pr.outputs.number }} \ No newline at end of file