softprops /action-gh-release

📦 :octocat: GitHub Action for creating GitHub Releases

★ 5,796⑂ 646👁 24⑃ 464● 387▤ 45
TypeScriptMITCreated 2019-08-25
下载:v3.0.4v3.0.4 ↓3.0.42026-11-05
+0
日增长
5,796
stars
646
forks
24
watchers
464
prs
387
issues
45
releases

README

📦 :octocat:


  action gh-release



   A GitHub Action for creating GitHub Releases on Linux, Windows, and macOS virtual environments



  



  
		
	




- 🤸 Usage
  - 🚥 Limit releases to pushes to tags
  - ⬆️ Uploading release assets
  - 📝 External release notes
  - 💅 Customizing
    - inputs
    - outputs
    - environment variables
  - Permissions

 🤸 Usage

 🚥 Limit releases to pushes to tags

Typically usage of this action involves adding a step to a build that
is gated pushes to git tags. You may find step.if field helpful in accomplishing this
as it maximizes the reuse value of your workflow for non-tag pushes.

v2.6.2 is the final v2 release and is no longer maintained or supported. It
uses the Node 20 runtime deprecated by GitHub Actions.
Upgrade to v3, which runs on Node 24. If a problem still reproduces on the
latest v3, open a new issue with the exact action ref, workflow run URL,
runner, and relevant logs.

Below is a simple example of step.if tag gating

yaml
name: Main

on: push

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v6
      - name: Release
        uses: softprops/action-gh-release@v3
        if: github.ref_type == 'tag'


You can also use push config tag filter

yaml
name: Main

on:
  push:
    tags:
      - "v.."

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v6
      - name: Release
        uses: softprops/action-gh-release@v3


 ⬆️ Uploading release assets

You can configure a number of options for your
GitHub release and all are optional.

A common case for GitHub releases is to upload your binary after its been validated and packaged.
Use the with.files input to declare a newline-delimited list of glob expressions matching the files
you wish to upload to GitHub releases. If you'd like you can just list the files by name directly.
If a tag already has a GitHub release, the existing release will be updated with the release assets.

Below is an example of uploading a single asset named Release.txt

yaml
name: Main

on: push

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v6
      - name: Build
        run: echo ${{ github.sha }}  Release.txt
      - name: Test
        run: cat Release.txt
      - name: Release
        uses: softprops/action-gh-release@v3
        if: github.ref_type == 'tag'
        with:
          files: Release.txt


Below is an example of uploading more than one asset with a GitHub release

yaml
name: Main

on: push

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v6
      - name: Build
        run: echo ${{ github.sha }}  Release.txt
      - name: Test
        run: cat Release.txt
      - name: Release
        uses: softprops/action-gh-release@v3
        if: github.ref_type == 'tag'
        with:
          files: |
            Release.txt
            LICENSE


 

Top issues

Latest release

v3.0.4 v3.0.4 2026-11-05
- maintenance release with updated dependencies

Snapshot: 2026-11-16T09:23:14Z · Data license Apache-2.0 · JSON