Skip to content

Commit 3906698

Browse files
authored
ci: announce releases on Slack from the release workflow (#75)
* ci: announce releases on Slack from the release workflow When changesets/action reports a package was published, resolve the release URL from publishedPackages and post to the Slack Workflow Builder trigger via slackapi/slack-github-action (webhook-trigger mode). Mirrors the pattern in slackapi/node-slack-sdk's release.yml. Both new steps gate on steps.changesets.outputs.published == 'true', so nothing fires on the "opens/updates the release PR" runs — only on the run that follows merging that PR. Also updates the maintainers guide so step 5 reflects that the Slack announcement is now automated. * chore: clarify changeset audience is the internal maintainers channel * ci: simplify publication-details step to match bolt-js pattern Replace the jq-templated tag URL with `gh release view --json url`, and switch the message shape to `jq | paste -sd ', ' -`. Same behavior for a single-package release (`slack@<version>`), less indirection, and matches slackapi/bolt-js/release.yml:107-108. Also renames the URL output from `action_url` to `url` to match the same reference, and threads `GH_TOKEN` into the step's env so `gh` can auth.
1 parent 98479ec commit 3906698

3 files changed

Lines changed: 26 additions & 2 deletions

File tree

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"slack": patch
3+
---
4+
5+
Automate release announcements to the internal maintainers' Slack channel from the release workflow.

.github/maintainers_guide.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,7 @@ New official package versions are published when the release PR created from cha
8888

8989
4. **Merge and approve**: Merge the release PR. It may take up to 24 hours before you see you release in the [Claude Plugins](https://claude.com/plugins/slack) directory.
9090

91-
5. **Communicate the release**:
92-
- **External**: Post in relevant channels (e.g. #lang-javascript, #tools-bolt) on [Slack Community](https://community.slack.com/). Include a link to the release notes.
91+
5. **Communicate the release**: A Slack announcement is posted automatically to the release-announcements channel by `.github/workflows/release.yml` when the release PR is merged and a tag is cut. For broader outreach (e.g. `#tools-bolt` on [Slack Community](https://community.slack.com/)), post manually if desired.
9392

9493
## Everything Else
9594

.github/workflows/release.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ jobs:
3737
- name: Install Node dependencies
3838
run: npm install
3939
- name: Changesets release
40+
id: changesets
4041
uses: changesets/action@a45c4d594aa4e2c509dc14a9f2b3b67ba3780d0d # v1.9.0
4142
with:
4243
version: bash scripts/changeset_version.sh
@@ -47,3 +48,22 @@ jobs:
4748
prDraft: create
4849
env:
4950
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
51+
- name: Get publication details
52+
id: release
53+
if: steps.changesets.outputs.published == 'true'
54+
env:
55+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
56+
PUBLISHED_PACKAGES: ${{ steps.changesets.outputs.publishedPackages }}
57+
run: |
58+
echo "url=$(gh release view --json url -q .url)" >> "$GITHUB_OUTPUT"
59+
echo "message=$(echo "$PUBLISHED_PACKAGES" | jq -r '.[] | "\(.name)@\(.version)"' | paste -sd ', ' -)" >> "$GITHUB_OUTPUT"
60+
- name: Notify Slack
61+
if: steps.changesets.outputs.published == 'true'
62+
uses: slackapi/slack-github-action@45a88b9581bfab2566dc881e2cd66d334e621e2c # v3.0.3
63+
with:
64+
webhook: ${{ secrets.SLACK_RELEASE_ANNOUNCEMENTS_WEBHOOK_URL }}
65+
webhook-type: webhook-trigger
66+
payload: |
67+
action_url: "${{ steps.release.outputs.url }}"
68+
message: "${{ steps.release.outputs.message }}"
69+
repository: "${{ github.repository }}"

0 commit comments

Comments
 (0)