Skip to content

Commit

Permalink
Add Changelog workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
christianhelle committed Jan 9, 2024
1 parent c1ef07e commit 1fc489b
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/changelog.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Changelog

on:
workflow_dispatch:
push:
paths-ignore:
- '**/*'
- '!.github/workflows/changelog.yml'
- '!src/**/*.csproj'
- '!src/**/*.cs'
branches:
- 'master'

jobs:
changelog:
if: github.ref == 'refs/heads/master' && github.repository == 'christianhelle/apiclientcodegen'
runs-on: ubuntu-latest
steps:
- name: 🛒 Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.PAT }}
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.2'
- name: Install github_changelog_generator
run: gem install github_changelog_generator
- name: Re-generate CHANGELOG.md
run: github_changelog_generator --user christianhelle --project apiclientcodegen --token ${{ secrets.PAT }}
- name: Git commit CHANGELOG.md
run: |
git config --global user.name "Continuous Integration"
git config --global user.email "[email protected]"
git add CHANGELOG.md
git commit -m "Update changelog [skip ci]"
git push

0 comments on commit 1fc489b

Please sign in to comment.