A simple GitHub action to post a Slack message when a new version is released.
The following inputs briefly explained here are fully declared and documented in the action.yaml:
github_token
[Required] - GitHub tokenslack_token
[Required] - Slack tokenchannel_id
[Required] - Channel ID where to post (shown in 'channel details', e.g. 'C03AA0A0A3A')project_name
[Required] - Project name to displayrepo_owner_name
[Optional] - Repository owner namerepo_name
[Optional] - Repository name
Run this action on new tag push or new release!
on:
push:
tags:
- "v1*"
jobs:
examplejob:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
ref: main
- name: Notify new release on Slack
uses: brainfish-ai/slack-notify-release
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
slack_token: ${{ secrets.SLACK_TOKEN }}
channel_id: C03AA0A0A3A
project_name: My Project
Install dependencies
npm i
Build the action
npm run build