Skip to content
Latchkey

softprops/action-gh-release

Create a GitHub Release and upload assets when you push a tag.

Community actionCategory: Release AutomationLatest v2View on GitHub

What it does

softprops/action-gh-release creates or updates a GitHub Release for the tag that triggered the run and uploads any files you point it at.

It can generate release notes from merged PRs, so a tag push becomes a full release with binaries attached.

Usage

workflow (.yml)
on:
  push:
    tags: ['v*']
permissions:
  contents: write
jobs:
  release:
    runs-on: ubuntu-latest
    steps:
      - uses: softprops/action-gh-release@v2
        with:
          files: dist/*
          generate_release_notes: true

Inputs

InputDescriptionDefaultRequired
filesGlob(s) of asset files to attach.-No
tag_nameTag for the release.triggering tagNo
bodyRelease notes body.-No
draftCreate as a draft.falseNo
prereleaseMark as a prerelease.falseNo
generate_release_notesAuto-generate notes from PRs.falseNo

Outputs

OutputDescription
urlURL of the created release.
idRelease ID.

Notes

This runs on a tag push. The job needs permissions: contents: write.

Common errors

  • Resource not accessible by integration means the job lacks contents: write.
  • A release with no tag usually means the workflow was not triggered by a tag push and no tag_name was set.

Security and pinning

  • Pin to a commit SHA.

Frequently asked questions

How do I attach build artifacts to a GitHub Release?
Build them in earlier steps, then pass a glob to files, for example dist/*, with contents: write permission.
Running softprops/action-gh-release? Run it on Latchkey managed runners - self-healing and caching included. Start free → 30-day trial · No credit card