From 7b5a952d3a9668737a4c64dc3176b660af561d32 Mon Sep 17 00:00:00 2001 From: ykim-1 Date: Mon, 28 Oct 2024 15:58:24 -0700 Subject: [PATCH 1/7] add release-notify-slack workflow --- .github/workflows/release-notify-slack.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release-notify-slack.yml b/.github/workflows/release-notify-slack.yml index 525f8a53..43ad756d 100644 --- a/.github/workflows/release-notify-slack.yml +++ b/.github/workflows/release-notify-slack.yml @@ -3,7 +3,10 @@ name: Notify Dev DX Channel on Release on: release: types: [published] -# if: github-token.repository == 'linode/linode_api4-python' + +jobs: + notify: + runs-on: ubuntu-latest steps: - name: Notify Slack - Main Message id: main_message @@ -23,7 +26,7 @@ on: } ] } - env: + env: SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }} - name: Notify Slack - Threaded Release Notes @@ -36,4 +39,4 @@ on: "text": "Release Notes:\n${{ github.event.release.body }}" } env: - SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }} \ No newline at end of file + SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }} From eeacafade016d5f58b9d6d3264d1bd20aae25565 Mon Sep 17 00:00:00 2001 From: ykim-1 Date: Mon, 28 Oct 2024 16:01:28 -0700 Subject: [PATCH 2/7] add workflow dispatch --- .github/workflows/release-notify-slack.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release-notify-slack.yml b/.github/workflows/release-notify-slack.yml index 43ad756d..d67b9dd2 100644 --- a/.github/workflows/release-notify-slack.yml +++ b/.github/workflows/release-notify-slack.yml @@ -1,7 +1,7 @@ name: Notify Dev DX Channel on Release - on: release: + workflow_dispatch: null types: [published] jobs: From 05797abf7fe69955a17aea375f7c9c61c870af2b Mon Sep 17 00:00:00 2001 From: ykim-1 Date: Mon, 28 Oct 2024 16:37:50 -0700 Subject: [PATCH 3/7] gha test 1 --- .github/workflows/release-notify-slack.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release-notify-slack.yml b/.github/workflows/release-notify-slack.yml index d67b9dd2..53fff75a 100644 --- a/.github/workflows/release-notify-slack.yml +++ b/.github/workflows/release-notify-slack.yml @@ -21,7 +21,7 @@ jobs: "type": "section", "text": { "type": "mrkdwn", - "text": "*<${{ github.event.release.html_url }}|${{ github.repository }}: ${{ github.event.release.tag_name }}>* is now live! :tada:" + "text": "*New Release Published: *<${{ github.event.release.html_url }}|${{ github.repository }} - ${{ github.event.release.tag_name }}>* is now live! :tada:" } } ] @@ -36,7 +36,7 @@ jobs: payload: | { "thread_ts": "${{ steps.main_message.outputs.ts }}", - "text": "Release Notes:\n${{ github.event.release.body }}" + "text": "Release Notes" } env: SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }} From fe95fdcab380372f49c765aa53a4d61186f33bf1 Mon Sep 17 00:00:00 2001 From: ykim-1 Date: Mon, 28 Oct 2024 16:41:57 -0700 Subject: [PATCH 4/7] gha test 2 --- .github/workflows/release-notify-slack.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release-notify-slack.yml b/.github/workflows/release-notify-slack.yml index 53fff75a..c6b6a8fd 100644 --- a/.github/workflows/release-notify-slack.yml +++ b/.github/workflows/release-notify-slack.yml @@ -15,13 +15,12 @@ jobs: channel-id: ${{ secrets.SLACK_CHANNEL_ID }} payload: | { - "text": "*New Release Published in ${{ github.repository }}!*", "blocks": [ { "type": "section", "text": { "type": "mrkdwn", - "text": "*New Release Published: *<${{ github.event.release.html_url }}|${{ github.repository }} - ${{ github.event.release.tag_name }}>* is now live! :tada:" + "text": "New Release Published: *<${{ github.event.release.html_url }}|${{ github.repository }} - ${{ github.event.release.tag_name }}>* is now live! :tada:" } } ] @@ -36,7 +35,7 @@ jobs: payload: | { "thread_ts": "${{ steps.main_message.outputs.ts }}", - "text": "Release Notes" + "text": "${{ github.event.release.body }}" } env: SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }} From 94c48f0457aead448e6a9601fb283054cf00449b Mon Sep 17 00:00:00 2001 From: ykim-1 Date: Mon, 28 Oct 2024 16:47:21 -0700 Subject: [PATCH 5/7] gha test 3 --- .github/workflows/release-notify-slack.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release-notify-slack.yml b/.github/workflows/release-notify-slack.yml index c6b6a8fd..493f396e 100644 --- a/.github/workflows/release-notify-slack.yml +++ b/.github/workflows/release-notify-slack.yml @@ -35,7 +35,7 @@ jobs: payload: | { "thread_ts": "${{ steps.main_message.outputs.ts }}", - "text": "${{ github.event.release.body }}" + "text": "Release Notes:\n${{ toJSON(github.event.release.body) }}" } env: SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }} From b8a56e8090d569d24cb62274b30376a27e4fd803 Mon Sep 17 00:00:00 2001 From: ykim-1 Date: Mon, 28 Oct 2024 17:12:17 -0700 Subject: [PATCH 6/7] gha test 4 --- .github/workflows/release-notify-slack.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release-notify-slack.yml b/.github/workflows/release-notify-slack.yml index 493f396e..1fc5782c 100644 --- a/.github/workflows/release-notify-slack.yml +++ b/.github/workflows/release-notify-slack.yml @@ -20,7 +20,7 @@ jobs: "type": "section", "text": { "type": "mrkdwn", - "text": "New Release Published: *<${{ github.event.release.html_url }}|${{ github.repository }} - ${{ github.event.release.tag_name }}>* is now live! :tada:" + "text": "*New Release Published: linode_api4-python - ${{ github.event.release.tag_name }}* is now live! :tada:" } } ] @@ -35,7 +35,7 @@ jobs: payload: | { "thread_ts": "${{ steps.main_message.outputs.ts }}", - "text": "Release Notes:\n${{ toJSON(github.event.release.body) }}" + "text": "*<${{ github.event.release.html_url }}| ${{ github.event.release.tag_name }} Release notes }}>* } env: SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }} From 9314f0be69465a78bebf91a9cf742de2ced3c9ff Mon Sep 17 00:00:00 2001 From: ykim-1 Date: Mon, 28 Oct 2024 17:17:53 -0700 Subject: [PATCH 7/7] gha test 5 --- .github/workflows/release-notify-slack.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release-notify-slack.yml b/.github/workflows/release-notify-slack.yml index 1fc5782c..6ba25425 100644 --- a/.github/workflows/release-notify-slack.yml +++ b/.github/workflows/release-notify-slack.yml @@ -20,7 +20,7 @@ jobs: "type": "section", "text": { "type": "mrkdwn", - "text": "*New Release Published: linode_api4-python - ${{ github.event.release.tag_name }}* is now live! :tada:" + "text": "*New Release Published: _linode_api4-python_ - ${{ github.event.release.tag_name }} is now live!* :tada:" } } ] @@ -35,7 +35,7 @@ jobs: payload: | { "thread_ts": "${{ steps.main_message.outputs.ts }}", - "text": "*<${{ github.event.release.html_url }}| ${{ github.event.release.tag_name }} Release notes }}>* + "text": "*<${{ github.event.release.html_url }}| ${{ github.event.release.tag_name }} Release notes }}>*" } env: SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}