From a77821d17de041e62e455c519d255fd3ab098759 Mon Sep 17 00:00:00 2001 From: LBU Date: Mon, 24 Aug 2026 15:44:22 +0200 Subject: [PATCH] FSHSP-165 feat(ci): notify Slack on ui-kit release publication --- .github/workflows/publish-ui-kit.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.github/workflows/publish-ui-kit.yml b/.github/workflows/publish-ui-kit.yml index 2865cbb7..6e17132d 100644 --- a/.github/workflows/publish-ui-kit.yml +++ b/.github/workflows/publish-ui-kit.yml @@ -293,3 +293,16 @@ jobs: --target "$GITHUB_SHA" \ --title "$tag" \ --notes-file release-notes.md + + # Guarded on dry_run even though `release` already only runs when `publish` + # did (needs: publish is skipped whenever publish's own `if` is false, and + # a job depending on a skipped job is skipped too): belt and suspenders + # against ever pinging Slack for a run that didn't actually publish. + - name: Notify Slack + if: ${{ success() && inputs.dry_run == false }} + env: + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} + VERSION: ${{ needs.publish.outputs.version }} + run: | + curl -sf -X POST --data-urlencode "payload={\"username\": \"incoming-webhook\", \"text\": \":package: @4sh/ui-kit v${VERSION} publié — \", \"icon_emoji\": \":rocket:\"}" \ + "$SLACK_WEBHOOK_URL"