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..0a95bb9 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: ${{ vars.SLACK_CHANNEL_ID }} + stage: start + build: name: Build runs-on: ubuntu-latest @@ -18,3 +27,27 @@ 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: ${{ vars.SLACK_CHANNEL_ID }} + stage: finish + status: ${{ steps.status.outputs.value }}