Skip to content
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

feat!: syntax does not work #217

Closed
BernhardBaumrock opened this issue Jun 1, 2023 · 8 comments
Closed

feat!: syntax does not work #217

BernhardBaumrock opened this issue Jun 1, 2023 · 8 comments

Comments

@BernhardBaumrock
Copy link

Please have a look at this repo: https://github.com/baumrock/conventionalcommits/commits/main

image

Am I doing anything wrong?

Any help would be greatly appreciated! Thx in advance

@TriPSs
Copy link
Owner

TriPSs commented Jun 1, 2023

This is because feat! is not considered breaking change in the angular preset I think, only in the conventional commit preset

@BernhardBaumrock
Copy link
Author

Thx @TriPSs for the quick reply! So how can I make it use the syntax listed in https://www.conventionalcommits.org/en/v1.0.0/ ? I thought I'm already using that...

@TriPSs
Copy link
Owner

TriPSs commented Jun 1, 2023

By changeing the preset option:

Optional preset: Preset that is used from conventional commits. Default angular.

- name: Conventional Changelog Action
  uses: TriPSs/conventional-changelog-action@v3
  with:
    preset: 'angular' <- here, note: you will have to make sure that the other preset is installed in your repo.

@BernhardBaumrock
Copy link
Author

I'm sorry but I'm lost @TriPSs
I understand that I need to change the preset, but the question is which value do I have to use? I've searched the repo for "preset" but I could not find any helpful information and also try and error with using conventionalcommits did not work.
Also where can I find more information about other preset is installed on your system?

@TriPSs
Copy link
Owner

TriPSs commented Jun 1, 2023

You can find the different presets here and the value to use is described inside the README of the corresponding preset.

You need to make sure it's installed with npm install <conventional-changelog-conventionalcommits>, check here

@BernhardBaumrock
Copy link
Author

Thx @TriPSs that's a pity. I'll stick with the angular preset then as it's easier to use a slightly different syntax than having to npm install external dependencies on every project where I'm using it.
Thx for your help!

@TriPSs
Copy link
Owner

TriPSs commented Jan 5, 2024

@BernhardBaumrock FYI: Since v5 we now compile presets inside the action and since v5.1.0 the conventionalcommits is also added.

@BernhardBaumrock
Copy link
Author

hey @TriPSs thx for the heads up! Awesome! Just tested and this works for me:

name: Releases
on:
  push:
    branches:
      - main

jobs:
  changelog:
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v3
      - name: conventional Changelog Action
        id: changelog
        uses: TriPSs/conventional-changelog-action@v5.1.0
        with:
          preset: "conventionalcommits"
          github-token: ${{ secrets.github_token }}

      - name: create release
        uses: actions/create-release@v1
        if: ${{ steps.changelog.outputs.skipped == 'false' }}
        env:
          GITHUB_TOKEN: ${{ secrets.github_token }}
        with:
          tag_name: ${{ steps.changelog.outputs.tag }}
          release_name: ${{ steps.changelog.outputs.tag }}
          body: ${{ steps.changelog.outputs.clean_changelog }}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants