|
| 1 | +name: Update Changelog |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: |
| 6 | + - main # Set this to the branch you want to trigger on |
| 7 | + release: |
| 8 | + types: [created] |
| 9 | + |
| 10 | +jobs: |
| 11 | + update-changelog: |
| 12 | + runs-on: ubuntu-latest |
| 13 | + steps: |
| 14 | + - name: Checkout Repository |
| 15 | + uses: actions/checkout@v4 |
| 16 | + |
| 17 | + - name: Set up Ruby |
| 18 | + uses: ruby/setup-ruby@v1 |
| 19 | + with: |
| 20 | + ruby-version: '3.2.2' # Specify your Ruby version |
| 21 | + |
| 22 | + - name: Install github_changelog_generator |
| 23 | + run: gem install github_changelog_generator |
| 24 | + |
| 25 | + - name: Generate Changelog |
| 26 | + env: |
| 27 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 28 | + run: | |
| 29 | + github_changelog_generator \ |
| 30 | + --user visionary-code-works \ |
| 31 | + --project HtmlScssClassChecker \ |
| 32 | + --token ${{ secrets.GITHUB_TOKEN }} \ |
| 33 | + --date-format "%Y-%m-%d" \ |
| 34 | + --output "CHANGELOG.md" \ |
| 35 | + --base "HISTORY.md" \ |
| 36 | + --exclude-labels "duplicate,question,invalid,wontfix,Duplicate,Question,Invalid,Wontfix,Meta: Exclude From Changelog" \ |
| 37 | + --summary-labels "Release summary,release-summary,Summary,summary" \ |
| 38 | + --breaking-labels "backwards-incompatible,Backwards incompatible,breaking" \ |
| 39 | + --enhancement-labels "enhancement,Enhancement,Type: Enhancement" \ |
| 40 | + --bug-labels "bug,Bug,Type: Bug" \ |
| 41 | + --deprecated-labels "deprecated,Deprecated,Type: Deprecated" \ |
| 42 | + --removed-labels "removed,Removed,Type: Removed" \ |
| 43 | + --security-labels "security,Security,Type: Security" \ |
| 44 | + --header "# Changelog" \ |
| 45 | + --merge-prefix "**Merged pull requests:**" \ |
| 46 | + --issue-prefix "**Closed issues:**" \ |
| 47 | + --breaking-prefix "**Breaking changes:**" \ |
| 48 | + --enhancement-prefix "**Implemented enhancements:**" \ |
| 49 | + --bug-prefix "**Fixed bugs:**" \ |
| 50 | + --deprecated-prefix "**Deprecated:**" \ |
| 51 | + --removed-prefix "**Removed:**" \ |
| 52 | + --security-prefix "**Security fixes:**" \ |
| 53 | + --simple-list \ |
| 54 | + --verbose |
| 55 | +
|
| 56 | + - name: Commit and Push Changes |
| 57 | + run: | |
| 58 | + git config --local user.email "action@github.com" |
| 59 | + git config --local user.name "GitHub Action" |
| 60 | + git add CHANGELOG.md |
| 61 | + git commit -m "Update CHANGELOG.md" |
| 62 | + git push |
0 commit comments