Skip to content

bwhitehead0/Github-Release-Action

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

65 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Github-Release-Action

Actions Status

Creates a plain Github release, without attaching assets or source code.

Usage

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

Mandatory Arguments

title

title is a message which should appear in the release. May contain spaces.

Optional Arguments

workdir

workdir can be used to specify a directory that contains the repository to be published.

tag

tag can be used to set the tag of the release

Notes

${{ 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
Screenshot of permission setting 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.

Use with GitHub Enterprise

To publish your release to self-hosted GitHub Enterprise, include GH_ENTERPRISE_TOKEN and GH_HOST as environment variables.
For example:

      - name: Create Release
        if: ${{ github.event.inputs.create_release }}
        uses: elgohr/Github-Release-Action@v5
        env:
          GH_ENTERPRISE_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          GH_HOST: yourgithub.company.com
        with:
          title: "New release"
          tag: "v1.0.1"

About

Publish Github releases in an action

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 100.0%