1- # Changesets Publish Slack Action
1+ # Commit Deploy Slack Action
22
33GitHub Action to publish messages to a Slack webhook after publishing packages with [ Changesets] .
44
@@ -19,33 +19,28 @@ jobs:
1919 name : Release
2020 runs-on : ubuntu-latest
2121 steps :
22- - name : Checkout Repo
23- uses : actions/checkout@v3
24-
25- - name : Setup Node.js 16.x
26- uses : actions/setup-node@v3
27- with :
28- node-version : 16.x
29-
30- - name : Install Dependencies
31- run : yarn
32-
33- - name : Create Release Pull Request or Publish to npm
34- id : changesets
35- uses : changesets/action@v1
36- with :
37- # This expects you to have a script called release which does a build for your packages and calls changeset publish
38- publish : yarn release
39- env :
40- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
41- NPM_TOKEN : ${{ secrets.NPM_TOKEN }}
42-
43- - name : Send a Slack notification if a publish happens
44- uses : ToppleTheNun/changesets-slack-publish-action@v1
45- if : steps.changesets.outputs.published == 'true'
22+ - name : Send a Slack notification
4623 with :
47- publishedPackages : ${{ steps.changesets.outputs.publishedPackages }}
4824 slackWebhook : ${{ secrets.SLACK_WEBHOOK }}
4925` ` `
5026
51- [Changesets]: https://github.com/changesets/changesets
27+ ## Message Customization
28+
29+ By default, a message like the below will be used. You can override this by providing a ` message` configuration value.
30+ We use [squirrelly](https://squirrelly.js.org/) as the templating engine with `[[` and `]]` as delimiters.
31+
32+ 
33+
34+ # ## Helpers
35+
36+ - `@linkify` : Helps with building links to things. Example: `@linkify('https://google.com')`
37+ - Input :
38+ - `url` : **mandatory** - obviously the URL you want to link to :)
39+ - `text` : **optional** - what text you want to show instead of just the link text
40+
41+ # ## Supported placeholders
42+
43+ - `it.github.*` : You can get everything off of the regular GitHub context provided to GitHub actions.
44+ - `it.repository` : The shorthand name for the repo (e.g., `singlestone/commit-deploy-slack-action`)
45+ - `it.links.commitSha` : Link to the commit that triggered this action.
46+ - `it.links.repository` : Link to the repository that triggered this action.
0 commit comments