Skip to content

Commit

Permalink
feat: Generating changelog.md using github actions! (getporter#2837)
Browse files Browse the repository at this point in the history
* feat: Generating changelog.md using github actions!

This PR will close down the issue getporter#2797 which will generate a chnagelog.md in the root repository of Porter when a release is published!

fixes: getporter#2797
Signed-off-by: Aviral Singh <itsaviral.2609@gmail.com>
Signed-off-by: Allan Guwatudde <allan@Allans-MacBook-Pro.local>
  • Loading branch information
itsaviral2609 authored and Allan Guwatudde committed Aug 9, 2023
1 parent 9896d0d commit d573c12
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/changelog.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Generate Changelog for Porter
on:
release:
types: [published]

jobs:
changelog:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3.3.0
with:
ref: main
fetch-depth: 0
token: ${{ secrets.GITHUB_TOKEN }}

- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: 16

- name: Install conventional-changelog-cli
run: npm install -g conventional-changelog-cli

- name: Generate changelog
run: conventional-changelog -p angular -i CHANGELOG.md -s -r 0

- name: Commit and push changes
run: |
git config --global user.name 'GitHub Actions'
git config --global user.email 'actions@github.com'
git add CHANGELOG.md
git commit -m "Updated Changelog after Latest Release" || echo "No changes to commit"
git push origin main

0 comments on commit d573c12

Please sign in to comment.