[go: up one dir, main page]

DEV Community

Cover image for Quick Release Creator - GitHub Action
Nathan Pickard
Nathan Pickard

Posted on

Quick Release Creator - GitHub Action

My Workflow

Quick Release Creator is a Github Action that lets you quickly create new releases for your github repos through a manually triggered workflow_dispatch event!

Instead of drafting a new release from scratch under the "Releases" section of a repo, Quick Release Creator provides you with a form to fill out which neatly composes a release for you. No need to remember what exactly to include in a release or fumbling with markdown!

action-screenshot

You can provide specific information about your release to the action, such as:

  • The version number tag
  • The name/title of the release
  • A brief description of major and minor changes
  • Any additional notes about the release

The major/minor changes and notes fields default to (Not noted) if that information is not provided)

After hitting the green "Run workflow" button, the action will execute and create your new release from the information you provided!

Quick Release Creator will then output a clean looking release with the help of some simple markdown!

Voilà!

Release example:
release-screenshot

Submission Category:

  • Maintainer Must-Haves
  • DIY Deployments

Yaml File:

name: Quick Release workflow

on:
  workflow_dispatch:
    inputs:
      version-number:
        description: 'Version number tag:'
        default: 'Enter version number'
        required: true
      release-name:
        description: 'Release name:'
        default: 'Enter release name'
        required: true
      major-changes:
        description: 'Major changes:'
        default: '(No major changes noted)'
        required: false
      minor-changes:
        description: 'Minor changes:'
        default: '(No minor changes noted)'
        required: false
      notes:
        description: 'Notes:'
        default: '(No extra notes)'
        required: false

jobs:  
  build:
    name: Create Release
    runs-on: ubuntu-latest
    steps:
      - name: Checkout code
        uses: actions/checkout@v2
      - name: Create Release
        id: create_release
        uses: actions/create-release@v1
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        with:
          tag_name: v${{ github.event.inputs.version-number }}
          release_name: ${{ github.event.inputs.release-name }}
          body: |
            ## Major changes:
            ${{ github.event.inputs.major-changes }}

            ## Minor changes:
            ${{ github.event.inputs.minor-changes }}

            ## Notes: 
            ${{ github.event.inputs.notes }}
          draft: false
          prerelease: false
Enter fullscreen mode Exit fullscreen mode

Additional Resources / Info

Quick Release Creator is based off the Create a Release GitHub action

I'm currently using my custom GitHub action in my Live Music PDX application, the live music finder for Portland, Oregon!

GitHub logo NathanPickard / Live-Music-PDX

Live music finder for the Portland, OR metro area

Check it out the production version here!

Happy coding!

Top comments (0)