From 4e0d55f721d3f2998f9f159eebf26ac7088f1516 Mon Sep 17 00:00:00 2001 From: Selim Ustel Date: Tue, 3 Mar 2026 15:13:56 +0100 Subject: [PATCH 1/4] add new slack action to test --- .github/actions/slack-notification/action.yml | 19 ++++++++--- .github/workflows/send-a-slack-message.yml | 34 +++++++++++++++++++ 2 files changed, 48 insertions(+), 5 deletions(-) create mode 100644 .github/workflows/send-a-slack-message.yml diff --git a/.github/actions/slack-notification/action.yml b/.github/actions/slack-notification/action.yml index 54019b70..0388a847 100644 --- a/.github/actions/slack-notification/action.yml +++ b/.github/actions/slack-notification/action.yml @@ -15,10 +15,19 @@ inputs: runs: using: "composite" steps: + # - name: Send Slack notification + # uses: slackapi/slack-github-action@485a9d42d3a73031f12ec201c457e2162c45d02d # v2 + # with: + # channel-id: ${{ inputs.channel-id }} + # slack-message: ${{ inputs.message }} + # env: + # SLACK_BOT_TOKEN: ${{ inputs.bot-token }} + - name: Send Slack notification - uses: slackapi/slack-github-action@485a9d42d3a73031f12ec201c457e2162c45d02d # v2 + uses: slackapi/slack-github-action@v2.0.0 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..efd2d99c --- /dev/null +++ b/.github/workflows/send-a-slack-message.yml @@ -0,0 +1,34 @@ +name: Send a Slack Message + +on: + workflow_dispatch: + +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 + # 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 }} From 6f4fbf7917905eabbfcf3e48f22a72618ca5632b Mon Sep 17 00:00:00 2001 From: Selim Ustel Date: Tue, 3 Mar 2026 15:17:45 +0100 Subject: [PATCH 2/4] run workflow on master PR --- .github/workflows/send-a-slack-message.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/send-a-slack-message.yml b/.github/workflows/send-a-slack-message.yml index efd2d99c..67a12f95 100644 --- a/.github/workflows/send-a-slack-message.yml +++ b/.github/workflows/send-a-slack-message.yml @@ -1,7 +1,8 @@ name: Send a Slack Message on: - workflow_dispatch: + pull_request: + branches: [master, release/*] jobs: releases: From 7449353ad63949480e30cfc969380b339c29ef50 Mon Sep 17 00:00:00 2001 From: Selim Ustel Date: Tue, 3 Mar 2026 15:19:41 +0100 Subject: [PATCH 3/4] cleanup --- .github/actions/slack-notification/action.yml | 8 -------- .github/workflows/send-a-slack-message.yml | 8 +------- 2 files changed, 1 insertion(+), 15 deletions(-) diff --git a/.github/actions/slack-notification/action.yml b/.github/actions/slack-notification/action.yml index 0388a847..7f6bc685 100644 --- a/.github/actions/slack-notification/action.yml +++ b/.github/actions/slack-notification/action.yml @@ -15,14 +15,6 @@ inputs: runs: using: "composite" steps: - # - name: Send Slack notification - # uses: slackapi/slack-github-action@485a9d42d3a73031f12ec201c457e2162c45d02d # v2 - # with: - # channel-id: ${{ inputs.channel-id }} - # slack-message: ${{ inputs.message }} - # env: - # SLACK_BOT_TOKEN: ${{ inputs.bot-token }} - - name: Send Slack notification uses: slackapi/slack-github-action@v2.0.0 with: diff --git a/.github/workflows/send-a-slack-message.yml b/.github/workflows/send-a-slack-message.yml index 67a12f95..10717142 100644 --- a/.github/workflows/send-a-slack-message.yml +++ b/.github/workflows/send-a-slack-message.yml @@ -26,10 +26,4 @@ jobs: 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 - # 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 }} + Please review the PR for more details: ${{ github.server_url }}/${{ github.repository }}/pull/${{ steps.pr.outputs.number }} \ No newline at end of file From 980c58f1abff8235cac309613acb63219d218e95 Mon Sep 17 00:00:00 2001 From: Selim Ustel Date: Thu, 5 Mar 2026 12:13:17 +0300 Subject: [PATCH 4/4] fix: change to the hash --- .github/actions/slack-notification/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/slack-notification/action.yml b/.github/actions/slack-notification/action.yml index 7f6bc685..1d65c656 100644 --- a/.github/actions/slack-notification/action.yml +++ b/.github/actions/slack-notification/action.yml @@ -16,7 +16,7 @@ runs: using: "composite" steps: - name: Send Slack notification - uses: slackapi/slack-github-action@v2.0.0 + uses: slackapi/slack-github-action@485a9d42d3a73031f12ec201c457e2162c45d02d #v2 with: method: chat.postMessage token: ${{ inputs.bot-token }}