Skip to content

Commit

Permalink
馃懛 Generate changelog from gitmoji
Browse files Browse the repository at this point in the history
  • Loading branch information
OlivierLDff committed Oct 3, 2022
1 parent a60d280 commit bea1ad6
Show file tree
Hide file tree
Showing 3 changed files with 80 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/generate-changelog-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: 馃敄 Create Release

on:
push:
tags:
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10

jobs:
build:
name: 馃敄 Create Release
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Changelog
uses: Bullrich/generate-release-changelog@6b60f004b4bf12ff271603dc32dbd261965ad2f2
id: Changelog
env:
REPO: ${{ github.repository }}
- name: Create Release
id: create_release
uses: actions/create-release@latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
body: |
${{ steps.Changelog.outputs.changelog }}
draft: false
prerelease: false
40 changes: 40 additions & 0 deletions .github/workflows/gitmoji-changelog.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: 馃槣 Gitmoji Changelog

on:
push:
tags:
- '**'

jobs:

changelog:
runs-on: ubuntu-latest

steps:
-
uses: actions/checkout@v2
with:
fetch-depth: 0 # 馃憟 Required to retrieve git history for changelog
-
name: "馃槣 Gitmoji Changelog"
run: |
npm install -g gitmoji-changelog
gitmoji-changelog --preset generic
-
uses: EndBug/add-and-commit@7f650514d761cfbf4479f4cbb5b1ff5ea6e77fe8
name: "Commit Changelog"
with:
default_author: github_actions
message: '馃摑 Update Changelog'
new_branch: changelog-update-${{ github.run_id }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
-
name: Create Pull Request
uses: devops-infra/action-pull-request@f1ba84bbd34181cb26b0c66d60fa39543be0d1c7
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
source_branch: changelog-update-${{ github.run_id }}
target_branch: main
title: 馃槣 Gitmoji Changelog
body: "**Automated pull request**"
7 changes: 7 additions & 0 deletions .gitmoji-changelogrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"project": {
"name": "naorpcpp",
"description": "A native C++ implementation for naorpc",
"version": "0.0.0"
}
}

0 comments on commit bea1ad6

Please sign in to comment.