Skip to content

Commit 2232bc1

Browse files
authored
Merge pull request #11 from kosli-dev/20260421_slack_notification
feat: add Slack notification on release and CODEOWNERS
2 parents 575879b + ed2815b commit 2232bc1

2 files changed

Lines changed: 34 additions & 0 deletions

File tree

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* @kosli-dev/customer-success

.github/workflows/publish.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,15 @@ on:
55
types: [published, edited]
66

77
jobs:
8+
notify-start:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: kosli-dev/reusable-actions/slack-release-notify@main
12+
with:
13+
slack-bot-token: ${{ secrets.SLACK_BOT_TOKEN }}
14+
slack-channel-id: ${{ vars.SLACK_CHANNEL_ID }}
15+
stage: start
16+
817
build:
918
name: Build
1019
runs-on: ubuntu-latest
@@ -18,3 +27,27 @@ jobs:
1827
- uses: JasonEtco/build-and-tag-action@v2
1928
env:
2029
GITHUB_TOKEN: ${{ github.token }}
30+
31+
notify-finish:
32+
needs: [notify-start, build]
33+
if: always() && needs.notify-start.result == 'success'
34+
runs-on: ubuntu-latest
35+
permissions:
36+
actions: read # ← needed to fetch run_started_at for duration
37+
contents: read # ← needed to read release notes via `gh release view`
38+
steps:
39+
- name: Determine status
40+
id: status
41+
run: |
42+
if [[ "${{ needs.build.result }}" == "success" ]]; then
43+
echo "value=success" >> "$GITHUB_OUTPUT"
44+
else
45+
echo "value=failure" >> "$GITHUB_OUTPUT"
46+
fi
47+
48+
- uses: kosli-dev/reusable-actions/slack-release-notify@main
49+
with:
50+
slack-bot-token: ${{ secrets.SLACK_BOT_TOKEN }}
51+
slack-channel-id: ${{ vars.SLACK_CHANNEL_ID }}
52+
stage: finish
53+
status: ${{ steps.status.outputs.value }}

0 commit comments

Comments
 (0)