Closed cyboooooorg closed 8 months ago
I'm experiencing the same error, it seems like the github action is not compatible with the v.5.6.0 config file, it does not recognize the majority of the configuration options from the docs
Hey, I will update the action to use the latest cocogitto version as soon as possible. Sorry for the inconvenience.
I have also raised https://github.com/cocogitto/cocogitto-action/pull/15 as sanity check to see which version of cog is being run
I think the problem is already solved, i'm not sure but when i use cocogitto/cocogitto-action@v3.5
and not the v3
it seems that works...
Here is my workflow.yml
and my cog.toml
:
Here is workflow.yml
name: Generate Release
on:
pull_request:
types: [closed]
branches:
- main
jobs:
release:
if: |
github.event.pull_request.merged == true &&
${{ !contains(github.event.pull_request.title, '[Chore] Update changelog') }}
name: SemVer release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- run: |
git config user.name github-actions
git config user.email github-actions@github.com
git config --global user.email github-actions@github.com
git config --global user.name github-actions
- name: Prepare SemVer release
id: prepare-release
uses: cocogitto/cocogitto-action@v3.5
with:
git-user-email: "github-actions@github.com"
git-user: "github-actions"
check-latest-tag-only: true
release: true
- name: Generate Changelog
id: generate-changelog
run: |
{
echo 'CHANGELOG<<EOF'
cog changelog --at ${{ steps.prepare-release.outputs.version }} -t full_hash
echo EOF
} >> "$GITHUB_OUTPUT"
- name: Create Pull Request
id: create-pull-request
uses: peter-evans/create-pull-request@v5
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: "chore: update changelog"
committer: GitHub <noreply@github.com>
author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
signoff: false
branch: update-changelog
delete-branch: true
title: "[Chore] Update changelog"
body: ${{ steps.generate-changelog.outputs.CHANGELOG }}
labels: |
documentation
automated pr
assignees: Cyboooooorg
reviewers: Cyboooooorg
draft: false
- name: Upload github release
uses: softprops/action-gh-release@v1
with:
body: ${{ steps.generate-changelog.outputs.CHANGELOG }}
tag_name: ${{ steps.prepare-release.outputs.version }}
token: ${{ secrets.GITHUB_TOKEN }}
- name: Enable Pull Request Automerge
run: gh pr merge --merge --auto -d "${{ steps.create-pull-request.outputs.pull-request-number }}"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Here is cog.toml
# Ignore merge commits from conventional commit checks
ignore_merge_commits = true
# A list of command to run BEFORE creating a version.
# All change generated by those commands will be committed with the generated version commit.
# `{{version}}` will be interpretted as your target version
pre_bump_hooks = []
# A list of command to run AFTER creating a version.
# `{{version}}` will be interpretted as your target version
post_bump_hooks = []
[changelog]
path = "CHANGELOG.md"
template = "remote"
remote = "github.com"
repository = "idle-space-empire"
owner = "Cyboooooorg"
authors = [
{ signature = "Cyborg", username = "Cyboooooorg" }
]
[commit_types]
chore = { changelog_title = "", omit_from_changelog = true }
# ? Setting git hooks
[git_hooks.commit-msg]
path = "hooks/git-commit-msg.sh"
[git_hooks.pre-push]
path = "hooks/git-pre-push.sh"
[git_hooks.post-rewrite]
path = "hooks/git-post-rewrite.sh"
@Cyboooooorg nice catch, I also noticed that the action v3.5 is using cog v5.4.0.
It's possible to use the @main
tag for now to pick up the latest version of the action
i.e.
- name: check conventional commits
uses: cocogitto/cocogitto-action@main
^^^^
Hi everyone,
I installed cocogitto 5.6.0 and did a
cog init
in my project. Here the generated file :And now my github action is crashing with the following error:
I suggest that cocogitto-action must ignore the new field or be updated to use cocogitto 5.6.0 😄