From 191b0453d922298b89785e78b8df7834c96501f3 Mon Sep 17 00:00:00 2001 From: Marko Bevc Date: Tue, 21 Apr 2026 17:36:48 +0100 Subject: [PATCH 1/3] feat: add Slack notification on release and CODEOWNERS --- .github/CODEOWNERS | 1 + .github/workflows/publish.yml | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+) create mode 100644 .github/CODEOWNERS diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 0000000..56176d5 --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1 @@ +* @kosli-dev/customer-success diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 22059f7..a3cb43e 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -5,6 +5,15 @@ on: types: [published, edited] jobs: + notify-start: + runs-on: ubuntu-latest + steps: + - uses: kosli-dev/reusable-actions/slack-release-notify@main + with: + slack-bot-token: ${{ secrets.SLACK_BOT_TOKEN }} + slack-channel-id: ${{ secrets.SLACK_CHANNEL_ID }} + stage: start + build: name: Build runs-on: ubuntu-latest @@ -18,3 +27,28 @@ jobs: - uses: JasonEtco/build-and-tag-action@v2 env: GITHUB_TOKEN: ${{ github.token }} + + notify-finish: + needs: [notify-start, build] + if: always() && needs.notify-start.result == 'success' + runs-on: ubuntu-latest + permissions: + actions: read # ← needed to fetch run_started_at for duration + contents: read # ← needed to read release notes via `gh release view` + steps: + - name: Determine status + id: status + run: | + if [[ "${{ needs.build.result }}" == "success" ]]; then + echo "value=success" >> "$GITHUB_OUTPUT" + else + echo "value=failure" >> "$GITHUB_OUTPUT" + fi + + - uses: kosli-dev/reusable-actions/slack-release-notify@main + with: + slack-bot-token: ${{ secrets.SLACK_BOT_TOKEN }} + slack-channel-id: ${{ secrets.SLACK_CHANNEL_ID }} + stage: finish + status: ${{ steps.status.outputs.value }} + From 67bbae38e5a5a94cc09a05a68d5fe0a2ba2bfc2a Mon Sep 17 00:00:00 2001 From: Marko Bevc Date: Mon, 27 Apr 2026 15:11:49 +0100 Subject: [PATCH 2/3] Apply suggestion from @mbevc1 --- .github/workflows/publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index a3cb43e..625b52c 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -11,7 +11,7 @@ jobs: - uses: kosli-dev/reusable-actions/slack-release-notify@main with: slack-bot-token: ${{ secrets.SLACK_BOT_TOKEN }} - slack-channel-id: ${{ secrets.SLACK_CHANNEL_ID }} + slack-channel-id: ${{ vars.SLACK_CHANNEL_ID }} stage: start build: From ed2815be9d6da1246c9192ebaf131f4dce315f13 Mon Sep 17 00:00:00 2001 From: Marko Bevc Date: Tue, 28 Apr 2026 12:09:36 +0100 Subject: [PATCH 3/3] fix: use variable for Slack Channel ID --- .github/workflows/publish.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 625b52c..0a95bb9 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -48,7 +48,6 @@ jobs: - uses: kosli-dev/reusable-actions/slack-release-notify@main with: slack-bot-token: ${{ secrets.SLACK_BOT_TOKEN }} - slack-channel-id: ${{ secrets.SLACK_CHANNEL_ID }} + slack-channel-id: ${{ vars.SLACK_CHANNEL_ID }} stage: finish status: ${{ steps.status.outputs.value }} -