You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?
GitHub Action
Github Release
v5
Creates a plain Github release, without attaching assets or source code.
name: Publish Release
on:
push:
tags:
- 'v*'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Create a Release
uses: elgohr/Github-Release-Action@v5
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
title: MyReleaseMessage
tag: MyTag
title
is a message which should appear in the release. May contain spaces.
workdir
can be used to specify a directory that contains the repository to be published.
tag
can be used to set the tag of the release
${{ secrets.GITHUB_TOKEN }}
can be used for publishing, if you configure the correct permissions.
This can be done by giving the Github token all permissions (referred to as "Read and write permission") with the setting below available in Settings > Actions > General
OR alternatively it can be achieved via adding
permissions:
packages: write
contents: write
to the concrete job creating the release. For more details see the documentation on token permissions.