This action creates a release in GitHub. If a slack bot token is provided, it will also send a message to a slack channel.
use-sem-ver: (default:false) Use semantic versioning. The default versioning is aYYMM.revisionformat (e.g.2312.3-> 2023. December 3rd release).tag: (default: Generated based on previous tags) Tag to use for the release. If you want to use a custom tag, you can provide it here.
For this to work you'll need to create a Slack app and add it to your workspace. You'll also need to enable Incoming Webhooks for your app. You can find more information about this here.
SLACK_BOT_TOKEN: Slack bot tokencustom-github-changelog: (default:false) Use custom changelog instead of the auto generated one. If you are passing in a custom body to github release, you can use this option to send the same body to slack.create-release: (default:true) Create a release in GitHub. If set tofalse, it will use the latest release.blocks: (default:[]) Slack blocks to send. This should be a javascript array as a string. You can find more information about slack blocks here
Important
If you enable custom-github-changelog or blocks, the other formatting options won't work besides the title.
title: (default: The github release title) Title of the release (You can use the$release_namevariable to include the release name)hide-authors: (default:false) Hide authors in release noteshide-prs: (default:false) Hide PRs in release noteshide-full-change-log-link(default:false): Hide full changelog link in release noteshide-title: (default:false) Hide title in release notesadd-divider: (default:false) Add divider in release notesmerge-items: (default:false) Merge auto generated items in release notes. If you have a customrelease.ymlfile and you provide a category which name includes one of the following words (automated,automation,automatization,bot,script,generated), the duplicated items will be merge to make the release note more readable.channels: Channels to publish to (;separated)repost-channels: Channels to repost to (;separated)group-id: Group ID to tag in the message (Used for showing the group handle in the release notes for easier tagging in case of an issue. E.g.S083QT5S1GF)
version: The version of the release
Important
You will need to set GITHUB_TOKEN in environment variables and need to provide write access to the repository.
name: Create release
on:
push:
branches:
- main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
jobs:
create-release:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Create release
uses: nbotond20/[email protected]
with:
use-sem-ver: trueIf you want to see nicely structured release notes, you can create a release.yml file under the .github folder with the following content:
# .github/release.yml
changelog:
exclude:
labels:
- ignore-for-release
authors:
- octocat
categories:
- title: Breaking Changes 🛠
labels:
- Semver-Major
- breaking-change
- title: Exciting New Features 🎉
labels:
- Semver-Minor
- enhancement
- title: Automated Fixes 🤖
labels:
- automation
- title: Other Changes
labels:
- '*'For more information about the custom release notes, check out the offical github documentation.