Skip to content

bloodyowl/slack-message-release-action

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Repository files navigation

Slack release message

A GitHub Action to push a slack webhook

This action suits the deploy on new tag workflow.

On your release workflow, this action will post to Slack the version, a link to the workflow and the changelog (if your changelog follows this format).

Preview

Screen Shot 2021-06-10 at 13 41 15

On Slack

Go to Slack's app manager, create a new app with an incoming webhook for the channel you want, copy the URL, that's your slack_webhook_url. If you want to make it pretty, there's an icon in this repository you can give to your app.

Inputs

version

The version you're releasing (e.g. v1.0.1, 1.0.1)

changelog

Optional, the contents of your changelog file.

Each version needs to start with ## x.y.z

slack_webhook_url

Your slack webhook URL

Example

- name: Get changelog
  id: changelog
  shell: bash
  # trick for multiline variables
  run: |
    echo "changelog<<EOF" >> $GITHUB_OUTPUT
    echo "$(head -100 HISTORY.md)" >> $GITHUB_OUTPUT
    echo "EOF" >> $GITHUB_OUTPUT

- name: Get version
  id: version
  run: echo "version=${{ github.ref_name }}" >> $GITHUB_OUTPUT

- name: Notify on Slack
  uses: bloodyowl/slack-message-release-action@v1.1.5
  with:
    version: ${{ steps.version.outputs.version }}
    changelog: ${{ steps.changelog.outputs.changelog }}
    slack_webhook_url: ${{ secrets.SLACK_WEBHOOK_URL }}

About

A GitHub action to notify a release from a HISTORY.md file

Resources

Stars

Watchers

Forks

Packages

No packages published