cycjimmy / semantic-release-action

GitHub Action for Semantic Release
https://github.com/marketplace/actions/action-for-semantic-release
MIT License
539 stars 98 forks source link

`perf` prefix triggered a patch release. #192

Closed pof-jhansilva closed 7 months ago

pof-jhansilva commented 7 months ago

Describe the bug Hey, a release workflow created a patch from a perf(TICKET): commit prefix that should have introduced a bump to the major.

Workflow This is how we are configuring the workflow:

create-release:
    name: Create release 🔖
    runs-on: ubuntu-latest
    steps:
      - name: Checkout ✅
        uses: actions/checkout@v3
        with:
          fetch-depth: 0
      - name: Create semantic release 🔖
        uses: cycjimmy/semantic-release-action@v4
        with:
          branch: main
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Output of the flow (did a merge commit)

[11:01:39 PM] [semantic-release] › ℹ  Start step "analyzeCommits" of plugin "@semantic-release/commit-analyzer"
[11:01:39 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ  Analyzing commit: perf(JIRA-TICKET): Update project to latest pipeline (#1)
[11:01:39 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ  The release type for the commit is patch
[11:01:39 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ  Analyzing commit: JIRA-TICKET - renamed project
[11:01:39 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ  The commit should not trigger a release
 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ  Analyzing commit: JIRA-TICKET - update of .NET
[11:01:39 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ  The commit should not trigger a release
[11:01:39 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ  Analyzing commit: fix(JIRA-TICKET): Repair integration tests
[11:01:39 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ  The release type for the commit is patch
[11:01:39 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ  Analyzing commit: perf(JIRA-TICKET): Update project to latest pipeline
✔  Completed step "analyzeCommits" of plugin "@semantic-release/commit-analyzer"
[11:01:39 PM] [semantic-release] › ℹ  The next release version is 3.55.1
[11:01:39 PM] [semantic-release] › ℹ  Start step "generateNotes" of plugin "@semantic-release/release-notes-generator"
[11:01:39 PM] [semantic-release] › ✔  Completed step "generateNotes" of plugin "@semantic-release/release-notes-generator"
[11:01:40 PM] [semantic-release] › ✔  Created tag v3.55.1
[11:01:40 PM] [semantic-release] › ℹ  Start step "publish" of plugin "@semantic-release/github"
[11:01:41 PM] [semantic-release] [@semantic-release/github] › ℹ  Published GitHub release: https://github.com/org/repo/releases/tag/v3.55.1
[11:01:41 PM] [semantic-release] › ✔  Completed step "publish" of plugin "@semantic-release/github"
[11:01:41 PM] [semantic-release] › ℹ  Start step "success" of plugin "@semantic-release/github"
[11:01:44 PM] [semantic-release] [@semantic-release/github] › ℹ  Added comment to issue #1: https://github.com/org/repo/pull/1#issuecomment-1942782397
[11:01:44 PM] [semantic-release] [@semantic-release/github] › ℹ  Added labels [ 'released' ] to issue #1
[11:01:45 PM] [semantic-release] › ✔  Completed step "success" of plugin "@semantic-release/github"l

Expected behavior We added a bunch of commits to the main branch, but semantic-release should have picked up the perf one and update the release major version instead it detected perf to be a patch.

cycjimmy commented 7 months ago

Commits with type 'perf' will be associated with a patch release by default.

See https://github.com/semantic-release/commit-analyzer#rules-matching

pof-jhansilva commented 7 months ago

@cycjimmy does using ! work for breaking change too?

Thanks.