WelcomePrivate Registry🔒 Code Challenge
Boilerplates
Code Linting
Github Actions
Styled
🔒 Local Setup
🔒 Server Setup
Pull Request Changelog Generator
A Github Action for generate a changelog, based on the merged pull request labels.
Behavior
On every v*
tag pushed on the main branch:
- Based on the merged pull request labels, a new changelog will be created.
- A new Github release will be created.
Tag format
The tag must be respect the semver convention:
- v10.2.31 ✅
- v1.0.0 ✅
- v1.0 ❌
- v1 ❌
Installation
- Add this to a
.github/workflows/action.yml
file:
name: Changelog Generatoron:push:tags:- "v*"jobs:changelog:name: Changelogruns-on: ubuntu-18.04steps:- name: Check-outuses: actions/checkout@v2with:ref: mainfetch-depth: 0- name: 'Get Previous tag'id: previoustaguses: "WyriHaximus/github-action-get-previous-tag@v1"- name: Generate release changelogid: generate-release-changeloguses: heinrichreimer/github-changelog-generator-action@v2.1.1with:token: ${{ secrets.GITHUB_TOKEN }}issues: trueissuesWoLabels: truepullRequests: trueprWoLabels: true- uses: actions/setup-node@v2with:node-version: '14'- run: npm version ${{ steps.previoustag.outputs.tag }} --git-tag-version false- name: Commit updatesuses: stefanzweifel/git-auto-commit-action@v4with:commit_message: Bump ${{ steps.previoustag.outputs.tag }} [skip-ci]file_pattern: CHANGELOG.md package.jsonrelease:name: Releaseruns-on: ubuntu-18.04needs: changelogsteps:- name: Checkout codeuses: actions/checkout@v2with:ref: mainfetch-depth: 0- name: 'Get Previous tag'id: previoustaguses: "WyriHaximus/github-action-get-previous-tag@v1"- name: Get last changelog entryid: changelog_readeruses: mindsers/changelog-reader-action@v2with:version: ${{ steps.previoustag.outputs.tag }}path: ./CHANGELOG.md- name: Create Releaseid: create_releaseuses: actions/create-release@v1env:GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}with:tag_name: ${{ steps.changelog_reader.outputs.version }}release_name: ${{ steps.changelog_reader.outputs.version }}body: ${{ steps.changelog_reader.outputs.changes }}prerelease: ${{ steps.changelog_reader.outputs.status == 'prereleased' }}draft: ${{ steps.changelog_reader.outputs.status == 'unreleased' }}