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

Commit analyzation doesn't pick up any commits to release #131

Open
szuperaz opened this issue Oct 12, 2022 · 3 comments
Open

Commit analyzation doesn't pick up any commits to release #131

szuperaz opened this issue Oct 12, 2022 · 3 comments

Comments

@szuperaz
Copy link

Hi,

I'm using [email protected] (tried with version 17 and 16 as well) and [email protected] with Yarn workspaces.

Here is my set up:
Semantic release is configured for each package inside the monorepo. Given the following folder structure
<repo root>/packages/<package-a>
<repo root>/packages/<package-b>

I'm running semantic release inside <package-a> and <package-b>

The semantic release command finds the new commits, and even though I have commits with the correct message format and changes in the correct folders (<package-a> and <package-b>), the process doesn't find any relevant changes. Here are the logs from the "commit analyze" step (debug mode is turned on):

Screenshot 2022-10-12 at 16 38 15

Do you see something wrong with this setup?

@amenella
Copy link

Hi, I encoutered the same issue but found out that when using a custom config for semantic-release you should:

  1. extend it from semantic-release-monorepo
  2. add at least @semantic-release/commit-analyzer in the list of plugins (this is the one which will find the proper semver release)
  3. eventually, also add @semantic-release/release-notes-generator in the list of plugin

Here is a sample of a minimal custom configuration:

// release.config.js

module.exports = {
  repositoryUrl: '<your_repository_url>',
  extends: 'semantic-release-monorepo',
  branches: ['master'], // if you want to release on master
  plugins: [
    // "semantic-release-monorepo" is perfoming the analysis of commits (for the subrepo)
    // then update the context passed to `analyzeCommits` and `generateNotes` steps of semantic-release
    "@semantic-release/commit-analyzer",
    "@semantic-release/release-notes-generator", // not necessary to create a new release but useful for release's notes
  ],
};

It would be nice to indicate this in the doc of current repository.

@jcapogna
Copy link

jcapogna commented Jul 4, 2023

I just ran into the same issue. What was not obvious is that I had to explicitly have @semantic-release/commit-analyzer as a plugin in my release config. I did not need that before.

As a side note, @semantic-release/commit-analyzer just moved to ESM which semantic-release-monorepo does not support yet, so you need to explicitly downgrade to v9 with npm install @semantic-release/commit-analyzer@9.

@kpturner
Copy link

As a side note, @semantic-release/commit-analyzer just moved to ESM which semantic-release-monorepo does not support yet, so you need to explicitly downgrade to v9 with npm install @semantic-release/commit-analyzer@9.

Did you try semantic-release-monorepo-esm ?

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

4 participants