-
Notifications
You must be signed in to change notification settings - Fork 1
43 lines (34 loc) · 1.33 KB
/
changelog.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
name: Generate Changelog
on:
push:
tags:
- "v*.*.*" # This will trigger on version tags like v0.0.1, v0.1.0, v1.0.0, etc.
workflow_dispatch: # This allows manual triggering of the workflow from the GitHub Actions tab.
permissions:
contents: write
jobs:
generate-changelog:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4 # Updated to use Node.js 20
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: "3.0" # Specify the version of Ruby
- name: Install github_changelog_generator
run: gem install github_changelog_generator
- name: Update remote URL
run: git remote set-url origin https://github.com/joshuadanpeterson/typewriter.nvim.git
- name: Generate Changelog
run: |
github_changelog_generator --user joshuadanpeterson --project typewriter.nvim --token ${{ secrets.GITHUB_TOKEN }}
- name: Commit and push changelog
run: |
git config --global user.name 'Josh Peterson'
git config --global user.email '[email protected]'
git add CHANGELOG.md
git commit -m 'Update changelog'
git push origin HEAD:${{ github.event.repository.default_branch }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}