Skip to content

hengkyawijaya/release-drafter-action

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Release Drafter Action

Release Drafter Action is lightweight github action release drafter to help you to automate your release draft using merge event as the trigger. The version will increment automatically with some spec below

Major = unlimited
Minor = max 99 -> after reach the max will back to 0 and then increment the major version
Patch = max 99 -> after reach the max will back to 0 and thne increment the minor version

How To Use

  1. Open Your Repo, create labels on your repo, for example learning-git. This label will be use as service indentifier on the github action script.
  2. Create github action script on your repo
.github
    workflows
        release_drafter.yml

Put below code on your release_drafter.yml

name: Create Release
on:
  pull_request:
    types: [closed]

jobs:
  release_drafter_job:
    runs-on: ubuntu-latest
    name: Just Create Release
    steps:
    - name: Release Drafter
      env:
          REPO: 'LearningGit'
          OWNER: 'hengkyawijaya'
          GITHUB_TOKEN: ${{ secrets.USER_TOKEN }}
      id: release_drafter
      uses: hengkyawijaya/release-drafter-action@v0.0.5
      with:
        service: 'learning-git'
        prefix: 'v'
        postfix: ''
  1. Open repo setting > secrets, then add new secret, with last step we need USER_TOKEN secret. Put the value inside it.
  2. Try your github action by creating test branch, then merge it to main/master
  3. Magic will happen, your draft release created automatically

Sample Repo that using this github action https://github.com/hengkyawijaya/LearningGit

Made with by hengkyawijaya