A simple GitHub action to post a Slack message when a new version is released.
Go in Slack API portal and get the bot token to run this app.
The following inputs briefly explained here are fully declared and documented in the action.yaml:
-
slack_token
[Required] - Slack token -
channel_id
[Required] - Channel ID where to post (shown in 'channel details', e.g. 'C03AA0A0A3A') -
project_name
[Required] - Project name to display
Run this action on new tag push or new release!
on:
push:
tags:
- 'v1*'
jobs:
examplejob:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
ref: main
- name: Notify new release on Slack
uses: italia/slack-notify-release-action
with:
slack_token: ${{ secrets.SLACK_TOKEN }}
channel_id: C03AA0A0A3A
project_name: Slack notification action
Result:
Install dependencies
npm i
Build the action
npm run build
Contributing is always appreciated. Feel free to open issues, fork or submit a Pull Request. If you want to know more about how to add new fields, check out CONTRIBUTING.md.
This software is maintained by the Developers Italia team.
© 2023 Dipartimento per la Trasformazione Digitale - Presidenza del Consiglio dei Ministri
Licensed under the EUPL. The version control system provides attribution for specific lines of code.
This GitHub Action is published in the Github Marketplace. As such, you can find the Terms of Service here. Also, here you can find the GitHub Marketplace Developer Agreement.