Skip to content

semestry/slackbot-release

Repository files navigation

Notify Slack on changes

This GitHub Action sends a rich-text notification to your Slack channel when there's a new release in your GitHub repository.

We use mack to render the body of the release as Slack blocks.

Design Master

Usage

Instructions

  • Create a Slack app called "Release Bot"
  • Click Incoming Webhooks and toggle Activate Incoming Webhooks
  • Click Add New Webhook to Workspace
  • Pick the channel the app will post to and then click Authorize
  • Set your SLACK_WEBHOOK_URL to the Webhook URL
  • Create a workflow file
name: Slackbot on release

on:
  release:
    types:
      - created

jobs:
  notify_slack:
    runs-on: ubuntu-latest
    name: Notify Slack on Release
    steps:
      - name: Notify Slack on Releases
        uses: amendx/[email protected]
        with:
          slack_webhook_url: ${{ secrets.SLACK_WEBHOOK_URL }}

Github actions

Developing locally

Install the dependencies

$ npm install

Build the typescript and package it for distribution

$ npm run build && npm run package

Releasing

Update artifacts first

$ npm run all

Cut a new release

$ npm run release

As this project is a Github action, you might want to repoint tags like v2 after a release. This has to be done manually for now. See https://github.com/actions/toolkit/blob/master/docs/action-versioning.md#recommendations for details.

git tag -fa v2 -m "Update v2 tag"
git push origin v2 --force

About

A Github Action for Slack notifications when a new release is out :)

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 5