-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Write changelog to a file in the repo #13
Comments
Hello! You can probably do something like this: jobs:
changelog:
name: Generate changelog
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Generate a changelog
uses: orhun/git-cliff-action@v2
with:
config: cliff.toml
args: --verbose
env:
OUTPUT: CHANGELOG.md
- name: Commit
run: |
git config user.name 'github-actions[bot]'
git config user.email 'github-actions[bot]@users.noreply.github.com'
set +e
git add CHANGELOG.md
git commit -m "Update changelog"
git push https://${{ secrets.GITHUB_TOKEN }}@github.com/${GITHUB_REPOSITORY}.git upstream First it creates the changelog as I hope this is helpful 🐻 let me know if it works for you and we can probably mention this in README.md |
Was getting the same one when I had the Here's my action yaml: name: "Tagged release"
on:
push:
tags:
- "[0-9].[0-9].[0-9]*"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
changelog:
name: Generate changelog
runs-on: ubuntu-latest
outputs:
release_body: ${{ steps.git-cliff.outputs.content }}
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Generate a changelog
uses: orhun/git-cliff-action@v2
id: git-cliff
with:
config: cliff.toml
args: --latest --strip header
env:
OUTPUT: CHANGELOG.md
- name: Commit changes to changelog
run: |
git config user.name 'github-actions[bot]'
git config user.email 'github-actions[bot]@users.noreply.github.com'
set +e
git add CHANGELOG.md
git commit -m "ci: Update changelog"
git push https://${{ secrets.GITHUB_TOKEN }}@github.com/Get-Salesmonk/saasmonk-chat.git upstream |
Wait I made a mistake while sharing the example workflow, Can you try again with the correct branch name? |
It worked perfectly for my use case, thank you very much! |
Thanks for confirming! I added this example to the README.md in 9f1ad1d |
Hi,
Might be doing something dumb, but - is there no way to write the changelog to a
CHANGELOG.md
within the repo itself? Is that not something that's usual?Thanks for the action!
The text was updated successfully, but these errors were encountered: