Skip to content

Commit

Permalink
Move changelog config to .github, switch to gem
Browse files Browse the repository at this point in the history
The latest version of the github_changelog_generator gem properly
supports passing the config file path, but the GH action we were
using was quite behind the latest.

So just switch to running the gem directly, using parameter expansion
to retrieve the owner/project as explained in https://www.cazzulino.com/github-actions-repository.html
  • Loading branch information
kzu committed Oct 19, 2021
1 parent bfe0f2a commit b7ce2be
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 10 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
usernames-as-github-logins=true
header-label=
issues_wo_labels=true
pr_wo_labels=true
exclude-labels=bydesign,dependencies,duplicate,question,invalid,wontfix,need info
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ jobs:
token: ${{ env.GH_TOKEN }}

- name: ⚙ changelog
uses: faberNovel/github-changelog-generator-action@master
with:
options: --token ${{ secrets.GITHUB_TOKEN }} --o changelog.md
run: |
sudo gem install github_changelog_generator
github_changelog_generator --user ${GITHUB_REPOSITORY%/*} --project ${GITHUB_REPOSITORY##*/} --token ${{ secrets.GITHUB_TOKEN }} --o changelog.md --config-file .github/.github_changelog_generator
- name: 🚀 changelog
run: |
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/release-notes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,16 @@ jobs:
run: echo "SINCE_TAG=$(git describe --abbrev=0 --tags $(git rev-list --tags --skip=1 --max-count=1))" >> $GITHUB_ENV

- name: ⚙ changelog
uses: faberNovel/github-changelog-generator-action@master
if: env.SINCE_TAG != ''
with:
options: --token ${{ secrets.GITHUB_TOKEN }} --since-tag ${{ env.SINCE_TAG }} --o changelog.md
run: |
sudo gem install github_changelog_generator
github_changelog_generator --since-tag ${{ env.SINCE_TAG }} --user ${GITHUB_REPOSITORY%/*} --project ${GITHUB_REPOSITORY##*/} --token ${{ secrets.GITHUB_TOKEN }} --o changelog.md --config-file .github/.github_changelog_generator
- name: ⚙ changelog
uses: faberNovel/github-changelog-generator-action@master
if: env.SINCE_TAG == ''
with:
options: --token ${{ secrets.GITHUB_TOKEN }} --o changelog.md
run: |
sudo gem install github_changelog_generator
github_changelog_generator --user ${GITHUB_REPOSITORY%/*} --project ${GITHUB_REPOSITORY##*/} --token ${{ secrets.GITHUB_TOKEN }} --o changelog.md --config-file .github/.github_changelog_generator
- name: 🖉 release
shell: pwsh
Expand Down

0 comments on commit b7ce2be

Please sign in to comment.