Creates a Github release using a workflow action.
name: Publish Release
on:
push:
branches:
- master
tags:
- 'v*'
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- name: Create a release
uses: action-pack/github-release@v2
with:
tag: MyReleaseTag
title: MyReleaseTitle
body: MyReleaseMessageThe title input is the release name.
The body input is the release notes (optional).
The tag input is the tagname to be created for the release (optional).
The commit input is a commit hash or branch name to attach the release to (optional).
The token input is the repository access token (optional), defaults to secrets.GITHUB_TOKEN.
-
This can happen if the
Workflow permissionsin your repository settings ( Actions -> General ) are not set to theRead and writeoption.Either change that setting or otherwise add the following lines to your workflow job:
permissions: contents: write