-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #19 from meysamhadeli/feat/add-realese-drafter
feat: Add release drafter
- Loading branch information
Showing
6 changed files
with
250 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
# https://johanneskonings.dev/github/2021/02/28/github_automatic_releases_and-changelog/ | ||
# https://tiagomichaelsousa.dev/articles/stop-writing-your-changelogs-manually | ||
# https://github.com/release-drafter/release-drafter/issues/551 | ||
# https://github.com/release-drafter/release-drafter/pull/1013 | ||
# https://github.com/release-drafter/release-drafter/issues/139 | ||
# https://github.com/atk4/data/blob/develop/.github/release-drafter.yml | ||
|
||
# This release drafter follows the conventions from https://keepachangelog.com, https://common-changelog.org/ | ||
# https://www.conventionalcommits.org | ||
|
||
name-template: 'v$RESOLVED_VERSION' | ||
tag-template: 'v$RESOLVED_VERSION' | ||
template: | | ||
## What Changed 👀 | ||
$CHANGES | ||
**Full Changelog**: https://github.com/$OWNER/$REPOSITORY/compare/$PREVIOUS_TAG...v$RESOLVED_VERSION | ||
categories: | ||
- title: 🚀 Features | ||
labels: | ||
- feature | ||
- title: 🐛 Bug Fixes | ||
labels: | ||
- fix | ||
- bug | ||
- title: ♻️ Changes | ||
labels: | ||
- changed | ||
- enhancement | ||
- refactor | ||
- title: ⛔️ Deprecated | ||
labels: | ||
- deprecated | ||
- title: 🗑 Removed | ||
labels: | ||
- removed | ||
- title: 🔐 Security | ||
labels: | ||
- security | ||
- title: 📄 Documentation | ||
labels: | ||
- docs | ||
- documentation | ||
- title: 🧩 Dependency Updates | ||
labels: | ||
- deps | ||
- dependencies | ||
- title: 🧰 Maintenance | ||
label: 'chore' | ||
- title: 🧺 Miscellaneous #Everything except ABAP | ||
label: misc | ||
- title: 📝 Other changes | ||
## putting no labels pr to `Other Changes` category with no label - https://github.com/release-drafter/release-drafter/issues/139#issuecomment-480473934 | ||
|
||
# https://www.trywilco.com/post/wilco-ci-cd-github-heroku | ||
# https://github.com/release-drafter/release-drafter#autolabeler | ||
# https://github.com/fuxingloh/multi-labeler | ||
|
||
# Using regex for defining rules - https://regexr.com/ - https://regex101.com/ | ||
autolabeler: | ||
- label: 'chore' | ||
branch: | ||
- '/(chore)\/.*/' | ||
title: | ||
- '/^chore: .*/' | ||
- label: 'docs' | ||
branch: | ||
- '/(docs)\/.*/' | ||
title: | ||
- '/^docs: .*/' | ||
- label: 'bug' | ||
branch: | ||
- '/(fix)\/.*/' | ||
title: | ||
- '/^fix: .*/' | ||
- label: 'feature' | ||
branch: | ||
- '/(feat)\/.*/' | ||
title: | ||
- '/^feat: .*/' | ||
body: | ||
- '/JIRA-[0-9]{1,4}/' | ||
|
||
change-template: '- $TITLE @$AUTHOR (#$NUMBER)' | ||
change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks. | ||
version-resolver: | ||
major: | ||
labels: | ||
- major | ||
minor: | ||
labels: | ||
- minor | ||
patch: | ||
labels: | ||
- patch | ||
default: patch | ||
|
||
exclude-labels: | ||
- skip-changelog |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
# https://docs.github.com/en/repositories/releasing-projects-on-github/automatically-generated-release-notes | ||
# https://github.com/bcoe/conventional-release-labels | ||
# https://dev.to/github/how-to-automatically-generate-release-notes-for-your-project-2ng8 | ||
# https://www.conventionalcommits.org/en/v1.0.0/ | ||
|
||
# github release pre-defined template | ||
changelog: | ||
exclude: | ||
labels: | ||
- ignore-for-release | ||
categories: | ||
- title: 🚀 Features | ||
labels: | ||
- feature | ||
- title: 🐛 Bug Fixes | ||
labels: | ||
- fix | ||
- bug | ||
- title: ♻️ Changes | ||
labels: | ||
- changed | ||
- enhancement | ||
- refactor | ||
- title: ⛔️ Deprecated | ||
labels: | ||
- deprecated | ||
- title: 🗑 Removed | ||
labels: | ||
- removed | ||
- title: 🔐 Security | ||
labels: | ||
- security | ||
- title: 📄 Documentation | ||
labels: | ||
- docs | ||
- documentation | ||
- title: 🧩 Dependency Updates | ||
labels: | ||
- deps | ||
- dependencies | ||
- title: 🧰 Maintenance | ||
label: 'chore' | ||
- title: 🧺 Miscellaneous #Everything except ABAP | ||
label: misc | ||
- title: Other Changes | ||
labels: | ||
- "*" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# https://github.com/amannn/action-semantic-pull-request | ||
# https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/configuring-commit-squashing-for-pull-requests | ||
|
||
name: Conventional Commits Checks | ||
|
||
on: | ||
workflow_run: | ||
workflows: ["Release Drafter Auto Labeler"] | ||
types: | ||
- completed | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event.pull_request.number }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
|
||
check-conventional-commits-labels: | ||
name: Check conventional commits labels | ||
runs-on: [ self-hosted ] | ||
steps: | ||
- uses: danielchabr/pr-labels-checker@v3.1 | ||
with: | ||
hasSome: feature,fix,changed,deprecated,removed,security,docs,dependencies | ||
githubToken: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
validate-pull-request-title: | ||
name: Validate PR title | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: amannn/action-semantic-pull-request@v5 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
name: Release Drafter Auto Labeler | ||
|
||
on: | ||
pull_request: | ||
types: | ||
- opened | ||
- synchronize | ||
- reopened | ||
- labeled | ||
- unlabeled | ||
|
||
jobs: | ||
auto-labeler: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: release-drafter/release-drafter@v5 | ||
with: | ||
config-name: release-drafter.yml | ||
disable-releaser: true # only run auto-labeler for PRs | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# https://johanneskonings.dev/github/2021/02/28/github_automatic_releases_and-changelog/ | ||
# https://tiagomichaelsousa.dev/articles/stop-writing-your-changelogs-manually | ||
name: Release Drafter | ||
|
||
on: | ||
push: | ||
branches: | ||
- develop | ||
- main | ||
|
||
jobs: | ||
update_release_draft: | ||
name: Release drafter | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Update Release Draft | ||
uses: release-drafter/release-drafter@v5 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
on: | ||
release: | ||
types: | ||
- released | ||
push: | ||
branches: | ||
- main | ||
|
||
# Every push to main will create a new release and deploy to production. | ||
jobs: | ||
update: | ||
name: Update Changelog | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Update Changelog | ||
uses: stefanzweifel/changelog-updater-action@v1 | ||
with: | ||
latest-version: ${{ github.event.release.name }} | ||
release-notes: ${{ github.event.release.body }} | ||
|
||
- name: Commit updated Changelog | ||
uses: stefanzweifel/git-auto-commit-action@v4 | ||
with: | ||
branch: main | ||
commit_message: 'docs(changelog): update changelog' | ||
file_pattern: CHANGELOG.md |