File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -124,9 +124,30 @@ jobs:
124124 npm run build --workspace=@slack/socket-mode
125125
126126 - name : Publish to npm and create GitHub releases
127+ id : changesets
127128 uses : changesets/action@6a0a831ff30acef54f2c6aa1cbbc1096b066edaf # v1.7.0
128129 with :
129130 createGithubReleases : true
130131 publish : npm run changeset -- publish
131132 env :
132133 GITHUB_TOKEN : ${{ steps.credentials.outputs.token }}
134+
135+ - name : Get publication details
136+ if : steps.changesets.outputs.published == 'true'
137+ id : release
138+ run : |
139+ echo "message=$(echo "$PUBLISHED_PACKAGES" | jq -r '[.[] | "\(.name)@\(.version)"] | join(", ")')" >> "$GITHUB_OUTPUT"
140+ echo "action_url=$(echo "$PUBLISHED_PACKAGES" | jq -r '[.[] | "https://github.com/${{ github.repository }}/releases/tag/\(.name)@\(.version)"] | join("\n")')" >> "$GITHUB_OUTPUT"
141+ env :
142+ PUBLISHED_PACKAGES : ${{ steps.changesets.outputs.publishedPackages }}
143+
144+ - name : Notify Slack
145+ if : steps.changesets.outputs.published == 'true'
146+ uses : slackapi/slack-github-action@af78098f536edbc4de71162a307590698245be95 # v3.0.1
147+ with :
148+ webhook : ${{ secrets.SLACK_RELEASE_ANNOUNCEMENTS_WEBHOOK_URL }}
149+ webhook-type : webhook-trigger
150+ payload : |
151+ action_url: "${{ steps.release.outputs.action_url }}"
152+ message: "${{ steps.release.outputs.message }}"
153+ repository: "${{ github.repository }}"
You can’t perform that action at this time.
0 commit comments