Giter Site home page Giter Site logo

semantic-release / changelog Goto Github PK

View Code? Open in Web Editor NEW
283.0 4.0 26.0 2.46 MB

:blue_book: semantic-release plugin to create or update a changelog file

License: MIT License

JavaScript 100.00%
changelog conventional-changelog release semantic-release version

changelog's Introduction

@semantic-release/changelog

semantic-release plugin to create or update a changelog file.

Warning

Please consider whether committing release notes to a file is worth the added complexity compared to other available options for capturing release notes.

Build Status npm latest version npm next version

Step Description
verifyConditions Verify the changelogFile and changelogTitle options configuration.
prepare Create or update a changelog file in the local project directory with the changelog content created in the generate notes step.

Install

$ npm install @semantic-release/changelog -D

Usage

The plugin can be configured in the semantic-release configuration file:

{
  "plugins": [
    "@semantic-release/commit-analyzer",
    "@semantic-release/release-notes-generator",
    [
      "@semantic-release/changelog",
      {
        "changelogFile": "docs/CHANGELOG.md"
      }
    ],
    [
      "@semantic-release/git",
      {
        "assets": ["docs/CHANGELOG.md"]
      }
    ]
  ]
}

With this example, for each release, a docs/CHANGELOG.md will be created or updated.

Configuration

Options

Options Description Default
changelogFile File path of the changelog. CHANGELOG.md
changelogTitle Title of the changelog file (first line of the file). -

Examples

When used with the @semantic-release/git or @semantic-release/npm plugins the @semantic-release/changelog plugin must be called before those plugins in order to update the changelog file so the @semantic-release/git and @semantic-release/npm plugins can include it in the release.

{
  "plugins": [
    "@semantic-release/commit-analyzer",
    "@semantic-release/release-notes-generator",
    "@semantic-release/changelog",
    "@semantic-release/npm",
    "@semantic-release/git"
  ]
}

changelog's People

Contributors

danieltamkin avatar dependabot[bot] avatar gr2m avatar greenkeeper[bot] avatar hershmire avatar oscard0m avatar pvdlg avatar renovate[bot] avatar stalniy avatar travi avatar yashmurty avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

changelog's Issues

Missing Release version in changelog

Although we use automatic semantic release versioning, in rare cases we need to also create manual releases on GitHub. The combination has worked properly so far, but with the latest automated release 3.1.26 we are suddenly missing the previous version 3.1.25 in CHANGELOG.md. This previous version 3.1.25 had been created manually on GitHub, but it was detected correctly when release 3.1.26 was being created by semantic release (s. log below):

semantic-release:release-notes-generator previousTag: 'v3.1.25'
semantic-release:release-notes-generator currentTag: 'v3.1.26'

We expect to have this in CHANGELOG.md:
3.1.26
3.1.25
1.0.1

But we have this:
3.1.26
1.0.1

Is there anything that we should take into account when creating manual releases?

suppress changelog's for prereleases?

I'm using semantic-release 16.0.0-beta.19 which supports prereleases.

It would be really nice if this plugin could be configured to only update the changelog for full releases, skipping prereleases.

Preview/Regenerate changelog

How would I generate a changelog file without running a release? It seems that semantic-release --dry-run causes the changelog to not be generated by skipping the prepare step. Using semantic-release --no-ci will add a tag to the repository which is not an idempotent action.

Related, how would you generate a changelog for already tagged versions?

{
    "release": {
        "branch": [
            "int"
        ]
    },
    "branches": [
        "int"
    ],
    "plugins": [
        "@semantic-release/release-notes-generator",
        ["@semantic-release/changelog", {
                "changelogFile": "CHANGELOG.md"
        }]
    ]
}

[Help] How do I get this to work at all?

in my package.json

  "release": {
    "plugins": [
      "@semantic-release/commit-analyzer",
      "@semantic-release/release-notes-generator",
      "@semantic-release/changelog",
      "@semantic-release/npm",
      "@semantic-release/github",
      "@semantic-release/git"
    ]
  },

package versions:

$ cat package.json | jq ".devDependencies" | grep semantic
  "@semantic-release/changelog": "^5.0.1",
  "@semantic-release/git": "^9.0.0",
  "semantic-release": "^17.0.7",

repo:
https://github.com/NullVoxPopuli/ember-jsqr
I manually created the change log

C.I. log: https://github.com/NullVoxPopuli/ember-jsqr/runs/702505043?check_suite_focus=true

What's happening:

  • CHANGELOG.md is empty

What I expect

  • CHANGELOG.md to be populated with all my releases and versions, and continue to update as I merge stuff

Request for changelog templating

Hi :)

I am currently switching to semantic-release / travis-ci. Up to now I was using auto-changelog module to auto-generate our changelog file. That module supports templating and allowed us to make the changelog file a lot more compact.

See this example: https://github.com/hexonet/node-sdk/blob/master/HISTORY.md

Wouldn't that be an useful extension for your module too?

From its possibilities and its flexibility auto-changelog is IMO the best npm module and worth to have a look at it. Maybe reusing it in your module as it is actively maintained, could also be an option (your decision, just an idea that came up in my mind).
TIA for keeping us updated on this.

[feature request] support prettier opt-in for formatting

I've got a lint script that checks that all the files in my repo conform to my prettier config. It'd be nice if semantic-release's changelog would conform as well (opt-in, perhaps). I can get around this for now with semantic-release/exec.

FEATURE: Add other formats than Markdown

First, thanks for providing such an awesome plugin.

Would it be a good idea to provide support for other formats such as HTML?

The Use Case would be to directly incorporate the file into the app.

Should this be realised as an extra changelog-html plugin or as an option in this plugin? E.g:

{
    "path": "@semantic-release/changelog",
    "changelogFile": "src/changelog.md",
    "format": "html"  // Default value would be "markdown"
},

Change title of changelog

I use semantic release with differents tag format but the changelog version still X.Y.Z version.

I create two tag sprint0-1.0.0 and sprint0-1.0.1 but the version is changelog are 1.0.0 and 1.01.

Ex :
image

I wouldlike to display the name of the tag in the changelog.

Regards,
Gaetan

Changelog generation stopping semantic release?

Current behavior

After running the GitLab pipeline, the correct tag is created, but the release itself is missing. It looks like the issue is coming from the changelog generation, because as soon as I remove semantic-release/changelog from the configuration, everything works as expected. Therefore, I think it might either be an issue with semantic-release/changelog, semantic-release/gitlab or my configuration. I honestly cannot check which one it is since I only have the changelog to be added to the repository.

Additional Info:

.releaserc

{
  "branches": ["master"],
  "plugins": [
    "@semantic-release/commit-analyzer",
    "@semantic-release/release-notes-generator",
    [
      "@semantic-release/changelog",
      {
        "changelogFile": "docs/CHANGELOG.md"
      }
    ],
    [
      "@semantic-release/gitlab",
      {
        "assets": [{"path": "docs/CHANGELOG.md"}]
      }
    ]
  ]
}

gitlab-ci.yml (only the release part - this is called correctly, since otherwise the correct tag would not be created)

release:
  image: node:13
  stage: release
  only:
    refs:
    - master
  before_script:
    - 'echo Stage - Release started'
  script:
    - npm install @semantic-release/gitlab
    - npm install @semantic-release/changelog
    - npx semantic-release
  after_script:
    - 'echo Stage - Release finished'

runner.log (only semantic-release part)

[12:01:03 PM] [semantic-release] › ℹ  Running semantic-release version 17.4.4
[12:01:03 PM] [semantic-release] › ✔  Loaded plugin "verifyConditions" from "@semantic-release/changelog"
[12:01:03 PM] [semantic-release] › ✔  Loaded plugin "verifyConditions" from "@semantic-release/gitlab"
[12:01:03 PM] [semantic-release] › ✔  Loaded plugin "analyzeCommits" from "@semantic-release/commit-analyzer"
[12:01:03 PM] [semantic-release] › ✔  Loaded plugin "generateNotes" from "@semantic-release/release-notes-generator"
[12:01:03 PM] [semantic-release] › ✔  Loaded plugin "prepare" from "@semantic-release/changelog"
[12:01:03 PM] [semantic-release] › ✔  Loaded plugin "publish" from "@semantic-release/gitlab"
[12:01:05 PM] [semantic-release] › ✔  Run automated release from branch master on repository https://gitlab-ci-token:[secure]@gitlab.***.com/***.git
[12:01:06 PM] [semantic-release] › ✔  Allowed to push to the Git repository
[12:01:06 PM] [semantic-release] › ℹ  Start step "verifyConditions" of plugin "@semantic-release/changelog"
[12:01:06 PM] [semantic-release] › ✔  Completed step "verifyConditions" of plugin "@semantic-release/changelog"
[12:01:06 PM] [semantic-release] › ℹ  Start step "verifyConditions" of plugin "@semantic-release/gitlab"
[12:01:06 PM] [semantic-release] [@semantic-release/gitlab] › ℹ  Verify GitLab authentication (https://gitlab.***.com/api/v4)
[12:01:06 PM] [semantic-release] › ✔  Completed step "verifyConditions" of plugin "@semantic-release/gitlab"
[12:01:06 PM] [semantic-release] › ℹ  Found git tag v1.1.0 associated with version 1.1.0 on branch master
[12:01:06 PM] [semantic-release] › ℹ  Found 3 commits since last release
[12:01:06 PM] [semantic-release] › ℹ  Start step "analyzeCommits" of plugin "@semantic-release/commit-analyzer"
[12:01:06 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ  Analyzing commit: Merge branch '***' into 'master'
Resolve "***"
Closes #5
See merge request ***!3
[12:01:06 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ  The commit should not trigger a release
[12:01:06 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ  Analyzing commit: ***
[12:01:06 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ  The commit should not trigger a release
[12:01:06 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ  Analyzing commit: feat: ***
[12:01:06 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ  The release type for the commit is minor
[12:01:06 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ  Analysis of 3 commits complete: minor release
[12:01:06 PM] [semantic-release] › ✔  Completed step "analyzeCommits" of plugin "@semantic-release/commit-analyzer"
[12:01:06 PM] [semantic-release] › ℹ  The next release version is 1.2.0
[12:01:06 PM] [semantic-release] › ℹ  Start step "generateNotes" of plugin "@semantic-release/release-notes-generator"
[12:01:06 PM] [semantic-release] › ✔  Completed step "generateNotes" of plugin "@semantic-release/release-notes-generator"
[12:01:06 PM] [semantic-release] › ℹ  Start step "prepare" of plugin "@semantic-release/changelog"
[12:01:06 PM] [semantic-release] [@semantic-release/changelog] › ℹ  Create /builds/***/docs/CHANGELOG.md
[12:01:06 PM] [semantic-release] › ✔  Completed step "prepare" of plugin "@semantic-release/changelog"
[12:01:08 PM] [semantic-release] › ✔  Created tag v1.2.0
[12:01:08 PM] [semantic-release] › ℹ  Start step "publish" of plugin "@semantic-release/gitlab"

Changelog is not being written to repository.

Here's some selected output from --debug (entire output at the bottom):

[9:23:04 PM] [semantic-release] › ✔  Run automated release from branch develop
  semantic-release:git Error: Command failed with exit code 128: git push --dry-run [email protected]:proxyco/testing-semantic-release.git HEAD:develop
  semantic-release:git     at makeError (/usr/local/lib/node_modules/semantic-release/node_modules/execa/lib/error.js:56:11)
  semantic-release:git     at handlePromise (/usr/local/lib/node_modules/semantic-release/node_modules/execa/index.js:114:26)
  semantic-release:git     at process._tickCallback (internal/process/next_tick.js:68:7) +0ms
[9:23:04 PM] [semantic-release] › ✔  Allowed to push to the Git repository

*snip*

[9:23:05 PM] [semantic-release] › ℹ  Start step "prepare" of plugin "@semantic-release/changelog"
[9:23:05 PM] [semantic-release] [@semantic-release/changelog] › ℹ  Create /root/project/CHANGELOG.stage.md
[9:23:05 PM] [semantic-release] › ✔  Completed step "prepare" of plugin "@semantic-release/changelog"
[9:23:05 PM] [semantic-release] › ℹ  Start step "prepare" of plugin "@semantic-release/git"
  semantic-release:git globed assets: [] +0ms
[9:23:05 PM] [semantic-release] [@semantic-release/git] › ℹ  Prepared Git release: stage-v1.0.4
[9:23:05 PM] [semantic-release] › ✔  Completed step "prepare" of plugin "@semantic-release/git"
[9:23:07 PM] [semantic-release] › ✔  Created tag stage-v1.0.4

Config:

module.exports = {
    "branch": "develop",
    "preset": "eslint",
    "plugins": [
        "@semantic-release/commit-analyzer",
        [
            "@semantic-release/release-notes-generator",
            {
                "linkCompare": false,
                "writerOpts": {
                    "headerPartial": "{{#if isPatch}}##{{else}}#{{/if}} {{#if @root.linkCompare}}[Stage]({{@root.host}}/{{#if @root.owner}}{{@root.owner}}/{{/if}}{{@root.repository}}/compare/{{previousTag}}...{{currentTag}}){{else}}Stage{{/if}}{{#if title}} \"{{title}}\"{{/if}}{{#if date}} ({{date}}){{/if}}",
                    // This overrides: https://github.com/conventional-changelog/conventional-changelog/blob/master/packages/conventional-changelog-eslint/writer-opts.js#L24
                    "transform": (commit) => {
                        if (!commit.tag || typeof commit.tag !== `string`) { 
                            return 
                        }
                        commit.message = commit.message.replace(/NNN-\d+/g, '[$&](https://some.link.com/$&)');
                        commit.shortHash = commit.hash.substring(0, 7); 
                        return commit
                    }
                }
            }
        ],
        [
            "@semantic-release/changelog",
            {
                "changelogFile": "CHANGELOG.stage.md"
            }
        ],
        [
            "@semantic-release/git",
            {
                "message": "${nextRelease.gitTag} released. [skip ci]\n\n${nextRelease.notes}"
            }
        ],
        [
            "@semantic-release/github",
            {
                "successComment": false
            }
        ],
        [
            "semantic-release-slack-bot",
            {
                "notifyOnSuccess": true,
                "markdownReleaseNotes": true,
                "onSuccessTemplate": {
                    "text": "Updates to $package_name has been released to *Stage*!\n\n$release_notes"
                }
            }
        ]
    ]
}

I don't understand why it doesn't get written. What is that error?

entire log

[9:23:04 PM] [semantic-release] › ℹ Running semantic-release version 15.13.28
semantic-release:config load config from: /root/project/.releaserc.js +0ms
semantic-release:config options values: { branch: 'develop',
semantic-release:config repositoryUrl: '[email protected]:proxyco/testing-semantic-release.git',
semantic-release:config tagFormat: 'stage-v${version}',
semantic-release:config plugins:
semantic-release:config [ '@semantic-release/commit-analyzer',
semantic-release:config [ '@semantic-release/release-notes-generator', [Object] ],
semantic-release:config [ '@semantic-release/changelog', [Object] ],
semantic-release:config [ '@semantic-release/git', [Object] ],
semantic-release:config [ '@semantic-release/github', [Object] ],
semantic-release:config [ 'semantic-release-slack-bot', [Object] ] ],
semantic-release:config preset: 'eslint',
semantic-release:config _: [],
semantic-release:config 'tag-format': 'stage-v${version}',
semantic-release:config t: 'stage-v${version}',
semantic-release:config debug: true,
semantic-release:config '$0': 'semantic-release' } +6ms
semantic-release:plugins options for @semantic-release/changelog/verifyConditions: { changelogFile: 'CHANGELOG.stage.md' } +0ms
[9:23:04 PM] [semantic-release] › ✔ Loaded plugin "verifyConditions" from "@semantic-release/changelog"
semantic-release:plugins options for @semantic-release/git/verifyConditions: { message:
semantic-release:plugins '${nextRelease.gitTag} released. [skip ci]\n\n${nextRelease.notes}' } +1ms
[9:23:04 PM] [semantic-release] › ✔ Loaded plugin "verifyConditions" from "@semantic-release/git"
semantic-release:plugins options for @semantic-release/github/verifyConditions: { successComment: false } +0ms
[9:23:04 PM] [semantic-release] › ✔ Loaded plugin "verifyConditions" from "@semantic-release/github"
semantic-release:plugins options for semantic-release-slack-bot/verifyConditions: { notifyOnSuccess: true,
semantic-release:plugins markdownReleaseNotes: true,
semantic-release:plugins onSuccessTemplate:
semantic-release:plugins { text:
semantic-release:plugins 'Updates to $package_name has been released to Stage!\n\n$release_notes' } } +0ms
[9:23:04 PM] [semantic-release] › ✔ Loaded plugin "verifyConditions" from "semantic-release-slack-bot"
semantic-release:plugins options for @semantic-release/commit-analyzer/analyzeCommits: {} +1ms
[9:23:04 PM] [semantic-release] › ✔ Loaded plugin "analyzeCommits" from "@semantic-release/commit-analyzer"
semantic-release:plugins options for @semantic-release/release-notes-generator/generateNotes: { linkCompare: false,
semantic-release:plugins writerOpts:
semantic-release:plugins { headerPartial:
semantic-release:plugins '{{#if isPatch}}##{{else}}#{{/if}} {{#if @root.linkCompare}}[Stage]({{@root.host}}/{{#if @root.owner}}{{@root.owner}}/{{/if}}{{@root.repository}}/compare/{{previousTag}}...{{currentTag}}){{else}}Stage{{/if}}{{#if title}} "{{title}}"{{/if}}{{#if date}} ({{date}}){{/if}}',
semantic-release:plugins transform: [Function: transform] } } +0ms
[9:23:04 PM] [semantic-release] › ✔ Loaded plugin "generateNotes" from "@semantic-release/release-notes-generator"
semantic-release:plugins options for @semantic-release/changelog/prepare: { changelogFile: 'CHANGELOG.stage.md' } +0ms
[9:23:04 PM] [semantic-release] › ✔ Loaded plugin "prepare" from "@semantic-release/changelog"
semantic-release:plugins options for @semantic-release/git/prepare: { message:
semantic-release:plugins '${nextRelease.gitTag} released. [skip ci]\n\n${nextRelease.notes}' } +0ms
[9:23:04 PM] [semantic-release] › ✔ Loaded plugin "prepare" from "@semantic-release/git"
semantic-release:plugins options for @semantic-release/github/publish: { successComment: false } +1ms
[9:23:04 PM] [semantic-release] › ✔ Loaded plugin "publish" from "@semantic-release/github"
semantic-release:plugins options for @semantic-release/github/success: { successComment: false } +0ms
[9:23:04 PM] [semantic-release] › ✔ Loaded plugin "success" from "@semantic-release/github"
semantic-release:plugins options for semantic-release-slack-bot/success: { notifyOnSuccess: true,
semantic-release:plugins markdownReleaseNotes: true,
semantic-release:plugins onSuccessTemplate:
semantic-release:plugins { text:
semantic-release:plugins 'Updates to $package_name has been released to Stage!\n\n$release_notes' } } +0ms
[9:23:04 PM] [semantic-release] › ✔ Loaded plugin "success" from "semantic-release-slack-bot"
semantic-release:plugins options for @semantic-release/github/fail: { successComment: false } +0ms
[9:23:04 PM] [semantic-release] › ✔ Loaded plugin "fail" from "@semantic-release/github"
semantic-release:plugins options for semantic-release-slack-bot/fail: { notifyOnSuccess: true,
semantic-release:plugins markdownReleaseNotes: true,
semantic-release:plugins onSuccessTemplate:
semantic-release:plugins { text:
semantic-release:plugins 'Updates to $package_name has been released to Stage!\n\n$release_notes' } } +1ms
[9:23:04 PM] [semantic-release] › ✔ Loaded plugin "fail" from "semantic-release-slack-bot"
[9:23:04 PM] [semantic-release] › ✔ Run automated release from branch develop
semantic-release:git Error: Command failed with exit code 128: git push --dry-run [email protected]:proxyco/testing-semantic-release.git HEAD:develop
semantic-release:git at makeError (/usr/local/lib/node_modules/semantic-release/node_modules/execa/lib/error.js:56:11)
semantic-release:git at handlePromise (/usr/local/lib/node_modules/semantic-release/node_modules/execa/index.js:114:26)
semantic-release:git at process._tickCallback (internal/process/next_tick.js:68:7) +0ms
[9:23:04 PM] [semantic-release] › ✔ Allowed to push to the Git repository
[9:23:04 PM] [semantic-release] › ℹ Start step "verifyConditions" of plugin "@semantic-release/changelog"
[9:23:04 PM] [semantic-release] › ✔ Completed step "verifyConditions" of plugin "@semantic-release/changelog"
[9:23:04 PM] [semantic-release] › ℹ Start step "verifyConditions" of plugin "@semantic-release/git"
[9:23:04 PM] [semantic-release] › ✔ Completed step "verifyConditions" of plugin "@semantic-release/git"
[9:23:04 PM] [semantic-release] › ℹ Start step "verifyConditions" of plugin "@semantic-release/github"
[9:23:04 PM] [semantic-release] [@semantic-release/github] › ℹ Verify GitHub authentication
[9:23:04 PM] [semantic-release] › ✔ Completed step "verifyConditions" of plugin "@semantic-release/github"
[9:23:04 PM] [semantic-release] › ℹ Start step "verifyConditions" of plugin "semantic-release-slack-bot"
[9:23:04 PM] [semantic-release] › ✔ Completed step "verifyConditions" of plugin "semantic-release-slack-bot"
semantic-release:get-last-release found tags: [ { gitTag: 'stage-v1.0.3', version: '1.0.3' }, { gitTag: 'stage-v1.0.2', version: '1.0.2' }, { gitTag: 'stage-v1.0.1', version: '1.0.1' }, { gitTag: 'stage-v1.0.0', version: '1.0.0' } ] +0ms
[9:23:05 PM] [semantic-release] › ℹ Found git tag stage-v1.0.3 associated with version 1.0.3
semantic-release:get-commits Use gitHead: 50e1de9fec86160de74463d4b50faf8e7af4b006 +0ms
[9:23:05 PM] [semantic-release] › ℹ Found 3 commits since last release
semantic-release:get-commits Parsed commits: [ { commit: { long: '8d784e0b0be351b24fe1ea4e4f13f61d54cd8a20', short: '8d784e0' }, tree: { long: 'a1a40d586cae63f3a94ef70f642d262e5a7fba31', short: 'a1a40d5' }, author: { name: 'Jim Brännlund', email: '[email protected]', date: 2019-10-31T21:18:45.000Z }, committer: { name: 'Jim Brännlund', email: '[email protected]', date: 2019-10-31T21:18:45.000Z }, subject: 'Fix: Remove all test-files', body: '', hash: '8d784e0b0be351b24fe1ea4e4f13f61d54cd8a20', message: 'Fix: Remove all test-files', gitTags: '(HEAD, origin/develop, develop)', committerDate: 2019-10-31T21:18:45.000Z }, { commit: { long: 'ba62e06b147f40fae61e56de1b701bfed259b431', short: 'ba62e06' }, tree: { long: 'fc68c8dfdc2652714f7be6a2e342f56a08127acc', short: 'fc68c8d' }, author: { name: 'Jim Brännlund', email: '[email protected]', date: 2019-10-31T21:12:47.000Z }, committer: { name: 'GitHub', email: '[email protected]', date: 2019-10-31T21:12:47.000Z }, subject: 'Merge pull request #39 from proxyco/debug-changelog', body: 'Chore: debug changelog in semantic-release', hash: 'ba62e06b147f40fae61e56de1b701bfed259b431', message: 'Merge pull request #39 from proxyco/debug-changelog\n\nChore: debug changelog in semantic-release', gitTags: '', committerDate: 2019-10-31T21:12:47.000Z }, { commit: { long: '1e9a90510f318d5dd4c9c8cce0324b77dd19b29c', short: '1e9a905' }, tree: { long: 'fc68c8dfdc2652714f7be6a2e342f56a08127acc', short: 'fc68c8d' }, author: { name: 'Jim Brännlund', email: '[email protected]', date: 2019-10-31T21:11:40.000Z }, committer: { name: 'Jim Brännlund', email: '[email protected]', date: 2019-10-31T21:11:40.000Z }, subject: 'Chore: debug changelog in semantic-release', body: '', hash: '1e9a90510f318d5dd4c9c8cce0324b77dd19b29c', message: 'Chore: debug changelog in semantic-release', gitTags: '', committerDate: 2019-10-31T21:11:40.000Z } ] +10ms
[9:23:05 PM] [semantic-release] › ℹ Start step "analyzeCommits" of plugin "@semantic-release/commit-analyzer"
[9:23:05 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ Analyzing commit: Fix: Remove all test-files
semantic-release:commit-analyzer Analyzing with default rules +0ms
semantic-release:commit-analyzer The rule { tag: 'Fix', release: 'patch' } match commit with release type 'patch' +0ms
[9:23:05 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ The release type for the commit is patch
[9:23:05 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ Analyzing commit: Merge pull request #39 from proxyco/debug-changelog

Chore: debug changelog in semantic-release
semantic-release:commit-analyzer Analyzing with default rules +1ms
[9:23:05 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ The commit should not trigger a release
[9:23:05 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ Analyzing commit: Chore: debug changelog in semantic-release
semantic-release:commit-analyzer Analyzing with default rules +0ms
[9:23:05 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ The commit should not trigger a release
[9:23:05 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ Analysis of 3 commits complete: patch release
[9:23:05 PM] [semantic-release] › ✔ Completed step "analyzeCommits" of plugin "@semantic-release/commit-analyzer"
[9:23:05 PM] [semantic-release] › ℹ The next release version is 1.0.4
[9:23:05 PM] [semantic-release] › ℹ Start step "generateNotes" of plugin "@semantic-release/release-notes-generator"
semantic-release:release-notes-generator version: '1.0.4' +0ms
semantic-release:release-notes-generator host: undefined +0ms
semantic-release:release-notes-generator owner: 'proxyco' +1ms
semantic-release:release-notes-generator repository: 'testing-semantic-release' +0ms
semantic-release:release-notes-generator previousTag: 'stage-v1.0.3' +0ms
semantic-release:release-notes-generator currentTag: 'stage-v1.0.4' +0ms
semantic-release:release-notes-generator host: 'https://github.com' +0ms
semantic-release:release-notes-generator host: 'https://github.com' +0ms
semantic-release:release-notes-generator linkReferences: undefined +0ms
semantic-release:release-notes-generator issue: 'issues' +0ms
semantic-release:release-notes-generator commit: 'commit' +0ms
[9:23:05 PM] [semantic-release] › ✔ Completed step "generateNotes" of plugin "@semantic-release/release-notes-generator"
[9:23:05 PM] [semantic-release] › ℹ Start step "prepare" of plugin "@semantic-release/changelog"
[9:23:05 PM] [semantic-release] [@semantic-release/changelog] › ℹ Create /root/project/CHANGELOG.stage.md
[9:23:05 PM] [semantic-release] › ✔ Completed step "prepare" of plugin "@semantic-release/changelog"
[9:23:05 PM] [semantic-release] › ℹ Start step "prepare" of plugin "@semantic-release/git"
semantic-release:git globed assets: [] +0ms
[9:23:05 PM] [semantic-release] [@semantic-release/git] › ℹ Prepared Git release: stage-v1.0.4
[9:23:05 PM] [semantic-release] › ✔ Completed step "prepare" of plugin "@semantic-release/git"
[9:23:07 PM] [semantic-release] › ✔ Created tag stage-v1.0.4
[9:23:07 PM] [semantic-release] › ℹ Start step "publish" of plugin "@semantic-release/github"
semantic-release:github release owner: 'proxyco' +0ms
semantic-release:github release repo: 'testing-semantic-release' +1ms
semantic-release:github release name: 'stage-v1.0.4' +0ms
semantic-release:github release branch: 'develop' +0ms
[9:23:08 PM] [semantic-release] [@semantic-release/github] › ℹ Published GitHub release: https://github.com/proxyco/testing-semantic-release/releases/tag/stage-v1.0.4
[9:23:08 PM] [semantic-release] › ✔ Completed step "publish" of plugin "@semantic-release/github"
[9:23:08 PM] [semantic-release] › ℹ Start step "success" of plugin "@semantic-release/github"
[9:23:08 PM] [semantic-release] [@semantic-release/github] › ℹ Skip commenting on issues and pull requests.
semantic-release:github found semantic-release issues: [] +0ms
[9:23:08 PM] [semantic-release] › ✔ Completed step "success" of plugin "@semantic-release/github"
[9:23:08 PM] [semantic-release] › ℹ Start step "success" of plugin "semantic-release-slack-bot"
[9:23:08 PM] [semantic-release] [semantic-release-slack-bot] › ℹ Sending slack notification on success
[9:23:08 PM] [semantic-release] [semantic-release-slack-bot] › ℹ { text:
'Updates to Testing Semantic Release has been released to Stage!\n\nStage (2019-10-31)\n\nChore\n\n• debug changelog in semantic-release (https://github.com/proxyco/testing-semantic-release/commit/1e9a90510f318d5dd4c9c8cce0324b77dd19b29c|1e9a905)\n\nFix\n\n• Remove all test-files (https://github.com/proxyco/testing-semantic-release/commit/8d784e0b0be351b24fe1ea4e4f13f61d54cd8a20|8d784e0)\n' }
[9:23:08 PM] [semantic-release] › ✔ Completed step "success" of plugin "semantic-release-slack-bot"
[9:23:08 PM] [semantic-release] › ✔ Published release 1.0.4

[Help] Change log not written

Hello.

I'm seeing this is a recurring problem here but I couldn't find a reason for that.

I have a open-source project which I add in this pr raulfdm/pin-dependencies-checker#3 the change log plugin.

I notice that no commit with the updated CHANGELOG was made. Do I need any other setup? :S

Thanks in advance.

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

github-actions
.github/workflows/release.yml
  • actions/checkout v4.1.3@1d96c772d19495a3b5c517cd2bc0cb401ea0529f
  • actions/setup-node v4.0.2@60edb5dd545a775178f52524783378180af0d1f8
.github/workflows/test.yml
  • actions/checkout v4.1.3@1d96c772d19495a3b5c517cd2bc0cb401ea0529f
  • actions/setup-node v4.0.2@60edb5dd545a775178f52524783378180af0d1f8
  • actions/checkout v4.1.3@1d96c772d19495a3b5c517cd2bc0cb401ea0529f
  • actions/setup-node v4.0.2@60edb5dd545a775178f52524783378180af0d1f8
npm
package.json
  • @semantic-release/error ^3.0.0
  • aggregate-error ^3.0.0
  • fs-extra ^11.0.0
  • lodash ^4.17.4
  • ava 5.1.0
  • clear-module 4.1.2
  • codecov 3.8.3
  • nyc 15.1.0
  • semantic-release 21.1.2
  • sinon 17.0.1
  • tempy 1.0.1
  • xo 0.39.1
  • semantic-release >=18.0.0
  • node >=14.17

  • Check this box to trigger a request for Renovate to run again on this repository

generated changelog.md doesn't pass linting

remark-lint reports several styling issues with the markdown generated by @semantic-release/changelog

Examples:

            8:3  warning  Incorrect list-item indent: add 2 spaces  list-item-indent            remark-lint
      8:13-8:23  warning  Use the trailing `[]` on reference links  no-shortcut-reference-link  remark-lint
      8:13-8:23  warning  Found reference to undefined definition   no-undefined-references     remark-lint
            9:3  warning  Incorrect list-item indent: add 2 spaces  list-item-indent            remark-lint
           10:3  warning  Incorrect list-item indent: add 2 spaces  list-item-indent            remark-lint
           17:3  warning  Incorrect list-item indent: add 2 spaces  list-item-indent            remark-lint
           18:3  warning  Incorrect list-item indent: add 2 spaces  list-item-indent            remark-lint

Are there any plans for semantic-release/changelog to conform to an established linting pattern for markdown?

Alternatively, can the syntax be made configurable in some way so consumers can configure linting compliant patterns for their projects? I hate encouraging teams to exclude files from automated checks.

Support lodash template for changelog file name

This is a proposal for supporting different changelog file per release channel.
This can be achieved by supporting lodash template for changelog file name, and expose branch object, like the one available for message parameter of @semantic-release/git plugin.
This would have two benifits:

  1. Lets the targetted audience recieve the changelog specific to the release channel they are subscribed to.
  2. Remove merge conflict when merging between release branches releasing to different channels.

How to create just CHANGELOG.md file?

Hi, I would like to create just CHANGELOG.md file with just simple command with npx without deploying or publishing. I couldn't do myself this, that's why I open the issue here.

I tried this:
yarn semantic-release --generate-notes --prepare

but it doesn't generate any file.

feature request - dedupe prelease release notes

When using prerelease functionality, release notes are added to the changelog both for prerelease branch and the master branch (once merged). This could be considered undesirable for use cases where prerelease is being heavily used, as the resulting changelog can become very noisy.

proposed acceptance criteria:

  • when performing changelog modification, logic should be added to deduplicate release note entries in the changelog file. A potential algorithm for doing this is shown below.
  • deduplication should be configurable (on/off as a minimum)

potential algorithm:

  1. Determine if changelog file exists (as currently done). If file exists continue. If not, write new file with new release as currently done and end.
  2. If dedupe config is not set to true execute changelog logic as currently done and end.
  3. Evaluate current branch being used for deployment.
  4. If master, remove content from top of changelog file to the top of the last master release note heading (i.e. delete release-notes associated with non-master release tags). Continue to step 6
  5. If non-master (any other branch for which prerelease: true is set in release config), remove content from top of changelog file until most recent release note for either master tag or the specific tag related to this branch is encountered. This would have the effect of allowing deduplication of release notes merged from other prerelease branches introduced currently releasing branch via merge - with the merged prerelease notes now showing as release notes for the prerelease branch being released.
  6. Add current release notes as generated from release note step.
  7. Add changelog title line to top of file.
  8. End.

Related:

similar request but would turn off changelog activity for prerelease branches, which may not be desirable - #51

some related background discussion on prerelease changelog behavior - semantic-release/semantic-release#1204

Action Required: Fix Renovate Configuration

There is an error with this repository's Renovate configuration that needs to be fixed. As a precaution, Renovate will stop PRs until it is resolved.

Error type: Cannot find preset's package (github>semantic-release/.github)

Changelog not created in repo

I apologize for the repetitive post of a very similar issue, but the solutions provided doesn't solve my case. I'm using CircleCI to run my builds and I'm getting a type error specifically at @semantic-release/git prepare step:

[6:32:47 PM] [semantic-release] › ✖  An error occurred while running semantic-release: { TypeError: Cannot read property 'name' of undefined
    at module.exports (/home/circleci/repo/node_modules/@semantic-release/git/lib/prepare.js:69:38)
    at processTicksAndRejections (internal/process/task_queues.js:86:5) pluginName: '@semantic-release/git' }

Here are my dependencies:

"@semantic-release/changelog": "^3.0.6",
"@semantic-release/git": "^8.0.0",
"semantic-release": "^15.13.30",
"semantic-release-gitmoji": "^1.3.2"

Here are my configs:

module.exports = {
  plugins: [
    [
      'semantic-release-gitmoji',
      {
        releaseRules: {
          major: [':boom:'],
          minor: [':sparkles:'],
          patch: [':bug:', ':ambulance:', ':lock:'],
        },
      },
    ],
    '@semantic-release/changelog',
    '@semantic-release/github',
    '@semantic-release/git',
  ],
};

Note: I'm using semantic-release-gitmoji, which uses both @semantic-release/commit-analyzer and @semantic-release/release-notes-generator by default.

I've followed the examples provided in the docs and even tried different configuration options of @semantic-release/changelog and @semantic-release/git.

I'm not sure if the name type error is referring to my package.json, but I do have it present. I'm not sure what the issue is at this point. Is there anything I'm missing? Any suggestions/solutions would be grateful!

Expand to see CircleCI log
#!/bin/bash -eo pipefail
yarn release
yarn run v1.15.2
$ semantic-release
[6:32:46 PM] [semantic-release] › ℹ  Running semantic-release version 15.13.30
[6:32:46 PM] [semantic-release] › ✔  Loaded plugin "verifyConditions" from "@semantic-release/changelog"
[6:32:46 PM] [semantic-release] › ✔  Loaded plugin "verifyConditions" from "@semantic-release/github"
[6:32:46 PM] [semantic-release] › ✔  Loaded plugin "verifyConditions" from "@semantic-release/git"
[6:32:46 PM] [semantic-release] › ✔  Loaded plugin "analyzeCommits" from "semantic-release-gitmoji"
[6:32:46 PM] [semantic-release] › ✔  Loaded plugin "generateNotes" from "semantic-release-gitmoji"
[6:32:46 PM] [semantic-release] › ✔  Loaded plugin "prepare" from "@semantic-release/changelog"
[6:32:46 PM] [semantic-release] › ✔  Loaded plugin "prepare" from "@semantic-release/git"
[6:32:46 PM] [semantic-release] › ✔  Loaded plugin "publish" from "@semantic-release/github"
[6:32:46 PM] [semantic-release] › ✔  Loaded plugin "success" from "@semantic-release/github"
[6:32:46 PM] [semantic-release] › ✔  Loaded plugin "fail" from "@semantic-release/github"
[6:32:46 PM] [semantic-release] › ✔  Run automated release from branch master
[6:32:47 PM] [semantic-release] › ✔  Allowed to push to the Git repository
[6:32:47 PM] [semantic-release] › ℹ  Start step "verifyConditions" of plugin "@semantic-release/changelog"
[6:32:47 PM] [semantic-release] › ✔  Completed step "verifyConditions" of plugin "@semantic-release/changelog"
[6:32:47 PM] [semantic-release] › ℹ  Start step "verifyConditions" of plugin "@semantic-release/github"
[6:32:47 PM] [semantic-release] [@semantic-release/github] › ℹ  Verify GitHub authentication
[6:32:47 PM] [semantic-release] › ✔  Completed step "verifyConditions" of plugin "@semantic-release/github"
[6:32:47 PM] [semantic-release] › ℹ  Start step "verifyConditions" of plugin "@semantic-release/git"
[6:32:47 PM] [semantic-release] › ✔  Completed step "verifyConditions" of plugin "@semantic-release/git"
[6:32:47 PM] [semantic-release] › ℹ  Found git tag v1.5.0 associated with version 1.5.0
[6:32:47 PM] [semantic-release] › ℹ  Found 1 commits since last release
[6:32:47 PM] [semantic-release] › ℹ  Start step "analyzeCommits" of plugin "semantic-release-gitmoji"
[6:32:47 PM] [semantic-release] [semantic-release-gitmoji] › ℹ  The next release will be a "patch" release.
[6:32:47 PM] [semantic-release] › ✔  Completed step "analyzeCommits" of plugin "semantic-release-gitmoji"
[6:32:47 PM] [semantic-release] › ℹ  The next release version is 1.5.1
[6:32:47 PM] [semantic-release] › ℹ  Start step "generateNotes" of plugin "semantic-release-gitmoji"
[6:32:47 PM] [semantic-release] [semantic-release-gitmoji] › ℹ  Release notes are generated.
[6:32:47 PM] [semantic-release] › ✔  Completed step "generateNotes" of plugin "semantic-release-gitmoji"
[6:32:47 PM] [semantic-release] › ℹ  Start step "prepare" of plugin "@semantic-release/changelog"
[6:32:47 PM] [semantic-release] [@semantic-release/changelog] › ℹ  Create /home/circleci/repo/CHANGELOG.md
[6:32:47 PM] [semantic-release] › ✔  Completed step "prepare" of plugin "@semantic-release/changelog"
[6:32:47 PM] [semantic-release] › ℹ  Start step "prepare" of plugin "@semantic-release/git"
[6:32:47 PM] [semantic-release] [@semantic-release/git] › ℹ  Found 1 file(s) to commit
[6:32:47 PM] [semantic-release] › ✖  Failed step "prepare" of plugin "@semantic-release/git"
[6:32:47 PM] [semantic-release] › ✖  An error occurred while running semantic-release: { TypeError: Cannot read property 'name' of undefined
    at module.exports (/home/circleci/repo/node_modules/@semantic-release/git/lib/prepare.js:69:38)
    at processTicksAndRejections (internal/process/task_queues.js:86:5) pluginName: '@semantic-release/git' }
{ TypeError: Cannot read property 'name' of undefined
    at module.exports (/home/circleci/repo/node_modules/@semantic-release/git/lib/prepare.js:69:38)
    at processTicksAndRejections (internal/process/task_queues.js:86:5) pluginName: '@semantic-release/git' }error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Exited with code exit status 1

Run only on certain branch

Is there functionality that would allow me to specify which branch(es) to run the changelog generation on? I for instance want to avoid all pre-release versions from entering the changelog.. It's important for users to read the primary distribution release notes, but to not see the pre-release items as it just makes the log too busy and long-winded.

If not, would you consider a PR for such functionality?

[Help] Generate changelog since the beginning

Hi! Sorry about it, but I'm having trouble generating the changelog. The CHANGELOG.md file is correctly generated and exported to the package, but because we don't commit it to the repository, whenever there's a new release, it generates again and does not include the previous information. I would like to keep all the changes. Is there a way to specify that I want it since the beginning? Or even an arbitrary number like the past 10 changes?

Changelog Title Expansion

Hey folks!

We're using Storybook combined with MDX to host documentation of our design system. We'd like to embed changelogs in our public documentation, but are running into an issue:

release-notes-generator doesn't have a template we can use for the "page header" (the header partial is per release best I can tell). changelog feels like it would be the appropriate place to inject a couple of lines of MDX code on top of the entire page:

import { Meta } from '@storybook/addon-docs/blocks';

<Meta title="Core/Changelog />

I don't think currently this is possible, since the changelogTitle property gets prefixed with # and postfixed with an empty line. Would you be willing to discuss allowing a document-wide, multi-line header?

Perhaps something along the lines of:

{
  ['changelog', {
    changelogTitle: 'Cool Package',
    changelogHeaderTemplate: './headerTemplate.hbs',
  }]
}
import { Meta } from '@storybook/addon-docs/blocks';

<Meta title="Core/Changelog />

# {{changelogTitle}}

Question: generate CHANGELOG.md for existing git repo

Hi,

We have an existing gitlab repo. which contains many tags created previously. How can I configure semantic-release/changelog to create CHANGLOG.md for all of those previously created tags, not only for the latest version bumped by semantic-release?

Thanks.

An in-range update of sinon is breaking the build 🚨

Version 4.1.6 of sinon was just published.

Branch Build failing 🚨
Dependency sinon
Current Version 4.1.5
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

sinon is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • continuous-integration/travis-ci/push The Travis CI build could not complete due to an error Details

Commits

The new version differs by 10 commits.

  • 68c37ed Update docs/changelog.md and set new release id in docs/_config.yml
  • cd8ae51 Add release documentation for v4.1.6
  • 29e80be 4.1.6
  • a5c59a5 Update History.md and AUTHORS for new release
  • 0ae60b6 Merge pull request #1653 from mroderick/upgrade-dependencies
  • dcd4191 Upgrade browserify to latest
  • a316f02 Upgrade markdownlint-cli to latest
  • 78ebdb3 Upgrade lint-staged to latest
  • fcf967b Upgrade dependency supports-color
  • 7c3cb4f Enable StaleBot with default configuration (#1649)

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Incompatible with semantic-release v18

In updating to semantic release v18, I noticed that semantic-release/changelog specifies a peerDependency that doesn't allow semantic-release v18: https://github.com/semantic-release/changelog/blob/master/package.json#L64. Is this intentional, or a typo (as in a missing =)?

Currently it's blocking my upgrade to semantic-release v18, see the npm installation error here: https://github.com/ismay/stylelint-no-unsupported-browser-features/pull/191/checks?check_run_id=3639274728#step:4:13

Changelog title duplication

Hi,

I have a problem, I use the no-ci option and the changelog always add the changelogTitle, so the CHANGELOG.md file contain a duplicated of changelogTitle.

Any idea?

Thank you.

Changelog title

Issue:

In my Changelog.md I have title but each new version logs are just added on the top of it. Thus title moves at the middle of the file

Expected:

I'd like my title to be always on top

Possible solutions:

Check if the first line of the file starts from # and if it's, add notes under title

CHANGELOG.md doesn't get generated

hello,
I don't know what I'm doing wrong.

That's how my config file looks like:

module.exports = {
  repositoryUrl: "myrepo.git",
  plugins: [
    "@semantic-release/commit-analyzer",
    "@semantic-release/release-notes-generator",
    ["@semantic-release/changelog", {
      "changelogFile": "CHANGELOG.md",
    }],
    [
      "@semantic-release/exec",
      {
        prepareCmd: 'release/prepare.sh "${nextRelease.version}"',
        publishCmd: 'release/publish.sh "${nextRelease.version}"'
      }
    ],
  ]
};

the log output:

[13:04:36] [semantic-release]    Start step "analyzeCommits" of plugin "@semantic-release/commit-analyzer"
[13:04:36] [semantic-release] [@semantic-release/commit-analyzer]    Analyzing commit: fix(release.config): invert order of scripts
[13:04:36] [semantic-release] [@semantic-release/commit-analyzer]    The release type for the commit is patch
[13:04:36] [semantic-release] [@semantic-release/commit-analyzer]    Analyzing commit: chore(package.json) bump version to 1.23.0-SNAPSHOT
[13:04:36] [semantic-release] [@semantic-release/commit-analyzer]    The commit should not trigger a release
[13:04:36] [semantic-release] [@semantic-release/commit-analyzer]    Analysis of 2 commits complete: patch release
[13:04:36] [semantic-release]    Completed step "analyzeCommits" of plugin "@semantic-release/commit-analyzer"
[13:04:36] [semantic-release] › ℹ  Start step "analyzeCommits" of plugin "@semantic-release/exec"
[13:04:36] [semantic-release] › ✔  Completed step "analyzeCommits" of plugin "@semantic-release/exec"
[13:04:36] [semantic-release] › ℹ  The next release version is 1.23.1
[13:04:36] [semantic-release] › ℹ  Start step "verifyRelease" of plugin "@semantic-release/exec"
[13:04:36] [semantic-release] › ✔  Completed step "verifyRelease" of plugin "@semantic-release/exec"
[13:04:36] [semantic-release] › ℹ  Start step "generateNotes" of plugin "@semantic-release/release-notes-generator"
[13:04:36] [semantic-release] › ✔  Completed step "generateNotes" of plugin "@semantic-release/release-notes-generator"
[13:04:36] [semantic-release] › ℹ  Start step "generateNotes" of plugin "@semantic-release/exec"
[13:04:36] [semantic-release] › ✔  Completed step "generateNotes" of plugin "@semantic-release/exec"
[13:04:36] [semantic-release] › ℹ  Start step "prepare" of plugin "@semantic-release/exec"
[13:04:36] [semantic-release] [@semantic-release/exec] › ℹ  Call script release/prepare.sh "1.23.1"
running 02-build-icons.sh
/nix/store/1jfvd7zg9d2v9mpzdbm8mbkhvcv97zfs-icons
[13:04:42] [semantic-release] › ✔  Completed step "prepare" of plugin "@semantic-release/exec"
[13:04:42] [semantic-release] › ℹ  Start step "prepare" of plugin "@semantic-release/changelog"
[13:04:42] [semantic-release] [@semantic-release/changelog] › ℹ  Create /data/jenkins/workspace/x_build_master@2/CHANGELOG.md
[13:04:42] [semantic-release] › ✔  Completed step "prepare" of plugin "@semantic-release/changelog"
[13:04:44] [semantic-release] › ✔  Created tag v1.23.1
[13:04:44] [semantic-release] › ℹ  Start step "publish" of plugin "@semantic-release/exec"
[13:04:44] [semantic-release] [@semantic-release/exec] › ℹ  Call script release/publish.sh "1.23.1"

but after that nothing gets generated in the repository

would appreciate some help

Program files created world writable

Some program files are created world writable. On a multiuser system this may allow an attacker to control behavior by modifying the files (eg a config file). On Linux the umask should usually prevent this but it's not guaranteed. Secure coding standards recommend always specifying a restricted mode so files are secure in any environment. MITRE calls this CWE-732, one of the top 25 most dangerous vulnerabilities.

Findings are listed here:
https://lgtm.com/query/8754882199744511397/

The one result seems to create a changelog, so maybe it's not very sensitive.
https://lgtm.com/projects/g/semantic-release/changelog/snapshot/c3f64ab8751118a4f9861d467b8c031e895d1f17/files/lib/prepare.js?sort=name&dir=ASC&mode=heatmap#L10

This came out of research with CodeQL.

Working with @semantic-release/github ?

Hello,

I use this config and no changelog were created on my repo for my latest release (v1.2.3). Here is the build. Do you have any idea why ? Thanks for help

/* eslint-disable no-useless-escape */
module.exports = {
  analyzeCommits: {
    preset: 'eslint',
    releaseRules: './config/release-rules.js',
    parserOpts: {
      headerPattern: /^(?::([\w-]*):)?\s*(\w*):\s*(.*)$/,
      headerCorrespondence: [
        'emoji',
        'tag',
        'message',
      ],
    },
  },
  generateNotes: {
    preset: 'eslint',
    parserOpts: {
      headerPattern: /^(?::([\w-]*):)?\s*(\w*):\s*(.*)$/,
      headerCorrespondence: [
        'emoji',
        'tag',
        'message',
      ],
    },
  },
  release: {
    // eslint-disable-next-line max-len
    verifyConditions: ['@semantic-release/changelog', '@semantic-release/npm', '@semantic-release/github'],
    // eslint-disable-next-line max-len
    publish: ['@semantic-release/changelog', '@semantic-release/npm', '@semantic-release/github'],
  },
};

Is there a way to have the full commit message included in the changelog?

It looks like at the moment release notes are just the commit subject.
Is there a way to use the body as well?

When merging PRs, I'd like to fill out a bunch of details about the change, impact, etc
My current config is just:

"release": {
    "branches": [
      "main",
      "master"
    ],
    "plugins": [
      "@semantic-release/commit-analyzer",
      "@semantic-release/release-notes-generator",
      "@semantic-release/changelog",
      "@semantic-release/npm",
      "@semantic-release/github",
      "@semantic-release/git"
    ]
  },

Changelog file not being generated

{
    "plugins": [
        [
            "@semantic-release/commit-analyzer",
            {
                "preset": "angular",
                "releaseRules": [
                    {
                        "release": "patch",
                        "type": "ci"
                    },
                    {
                        "release": "patch",
                        "scope": "/docs/*",
                        "type": "docs"
                    },
                    {
                        "release": "patch",
                        "type": "refactor"
                    }
                ]
            }
        ],
        "@semantic-release/release-notes-generator",
        "@semantic-release/changelog",
        "@semantic-release/github",
        "@semantic-release/npm",
        "@semantic-release/git"
    ],
    "debug": true
}

Is there any specific permission I need?

The bot is able to push commits and able to publish to NPM (though the latter probably has no effect on this one).

10:03:04  [15:02:54] [semantic-release] › ℹ  Running semantic-release version 15.13.3
10:03:04  [15:02:55] [semantic-release] › ✔  Loaded plugin "verifyConditions" from "@semantic-release/changelog"
10:03:04  [15:02:55] [semantic-release] › ✔  Loaded plugin "verifyConditions" from "@semantic-release/github"
10:03:04  [15:02:55] [semantic-release] › ✔  Loaded plugin "verifyConditions" from "@semantic-release/npm"
10:03:04  [15:02:55] [semantic-release] › ✔  Loaded plugin "verifyConditions" from "@semantic-release/git"
10:03:04  [15:02:55] [semantic-release] › ✔  Loaded plugin "analyzeCommits" from "@semantic-release/commit-analyzer"
10:03:04  [15:02:55] [semantic-release] › ✔  Loaded plugin "generateNotes" from "@semantic-release/release-notes-generator"
10:03:04  [15:02:55] [semantic-release] › ✔  Loaded plugin "prepare" from "@semantic-release/changelog"
10:03:04  [15:02:55] [semantic-release] › ✔  Loaded plugin "prepare" from "@semantic-release/npm"
10:03:04  [15:02:55] [semantic-release] › ✔  Loaded plugin "prepare" from "@semantic-release/git"
10:03:04  [15:02:55] [semantic-release] › ✔  Loaded plugin "publish" from "@semantic-release/github"
10:03:04  [15:02:55] [semantic-release] › ✔  Loaded plugin "publish" from "@semantic-release/npm"
10:03:04  [15:02:55] [semantic-release] › ✔  Loaded plugin "success" from "@semantic-release/github"
10:03:04  [15:02:55] [semantic-release] › ✔  Loaded plugin "fail" from "@semantic-release/github"
10:03:04  [15:02:55] [semantic-release] › ✔  Run automated release from branch master
10:03:04  [15:02:55] [semantic-release] › ✔  Allowed to push to the Git repository
10:03:04  [15:02:55] [semantic-release] › ℹ  Start step "verifyConditions" of plugin "@semantic-release/changelog"
10:03:04  [15:02:55] [semantic-release] › ✔  Completed step "verifyConditions" of plugin "@semantic-release/changelog"
10:03:04  [15:02:55] [semantic-release] › ℹ  Start step "verifyConditions" of plugin "@semantic-release/github"
10:03:04  [15:02:55] [semantic-release] [@semantic-release/github] › ℹ  Verify GitHub authentication (SNIP)
10:03:04  [15:02:56] [semantic-release] › ✔  Completed step "verifyConditions" of plugin "@semantic-release/github"
10:03:04  [15:02:56] [semantic-release] › ℹ  Start step "verifyConditions" of plugin "@semantic-release/npm"
10:03:04  [15:02:56] [semantic-release] [@semantic-release/npm] › ℹ  Verify authentication for registry SNIP/
10:03:04  [15:02:56] [semantic-release] › ✔  Completed step "verifyConditions" of plugin "@semantic-release/npm"
10:03:04  [15:02:56] [semantic-release] › ℹ  Start step "verifyConditions" of plugin "@semantic-release/git"
10:03:04  [15:02:56] [semantic-release] › ✔  Completed step "verifyConditions" of plugin "@semantic-release/git"
10:03:04  [15:02:56] [semantic-release] › ℹ  Found git tag v20.8.3 associated with version 20.8.3
10:03:04  [15:02:56] [semantic-release] › ℹ  Found 0 commits since last release
10:03:04  [15:02:56] [semantic-release] › ℹ  Start step "analyzeCommits" of plugin "@semantic-release/commit-analyzer"
10:03:04  [15:02:56] [semantic-release] [@semantic-release/commit-analyzer] › ℹ  Analysis of 0 commits complete: no release
10:03:04  [15:02:56] [semantic-release] › ✔  Completed step "analyzeCommits" of plugin "@semantic-release/commit-analyzer"
10:03:04  [15:02:56] [semantic-release] › ℹ  There are no relevant changes, so no new version is released.

[Help] Changelog has not been written 🤔

I'm a little confusing about how to properly setup changelog plugin. I've tried to do that in my company project and now in my open source project and I'm still missing something I can't find.

So, basically the file is not been updated/generated.

Here's my semantic-release.config:

module.exports = {
  release: {
    branch: 'master',
  },
  plugins: [
    '@semantic-release/commit-analyzer',
    '@semantic-release/release-notes-generator',
    [
      '@semantic-release/changelog',
      {
        changelogFile: 'CHANGELOG.md',
        changelogTitle: 'CHANGELOG',
      },
    ],
    '@semantic-release/npm',
    '@semantic-release/git',
  ],
};

When I debug:

$ semantic-release --dry-run --debug
[7:40:00 AM] [semantic-release] › ℹ  Running semantic-release version 15.13.18
  semantic-release:config load config from: /Users/raulmelo/projects/personal/generator-react-library/release.config.js +0ms
  semantic-release:config options values: { branch: 'master',
  semantic-release:config   repositoryUrl:
  semantic-release:config    'https://github.com/raulfdm/generator-react-component-library.git',
  semantic-release:config   tagFormat: 'v${version}',
  semantic-release:config   plugins:
  semantic-release:config    [ '@semantic-release/commit-analyzer',
  semantic-release:config      '@semantic-release/release-notes-generator',
  semantic-release:config      [ '@semantic-release/changelog', [Object] ],
  semantic-release:config      '@semantic-release/npm',
  semantic-release:config      '@semantic-release/git' ],
  semantic-release:config   release: { branch: 'master' },
  semantic-release:config   _: [],
  semantic-release:config   'dry-run': true,
  semantic-release:config   d: true,
  semantic-release:config   dryRun: true,
  semantic-release:config   debug: true,
  semantic-release:config   '$0':
  semantic-release:config    '/Users/raulmelo/projects/personal/generator-react-library/node_modules/.bin/semantic-release' } +4ms
  semantic-release:plugins options for @semantic-release/changelog/verifyConditions: { changelogFile: 'CHANGELOG.md', changelogTitle: 'CHANGELOG' } +0ms
[7:40:00 AM] [semantic-release] › ✔  Loaded plugin "verifyConditions" from "@semantic-release/changelog"
  semantic-release:plugins options for @semantic-release/npm/verifyConditions: {} +1ms
[7:40:00 AM] [semantic-release] › ✔  Loaded plugin "verifyConditions" from "@semantic-release/npm"
  semantic-release:plugins options for @semantic-release/git/verifyConditions: {} +0ms
[7:40:00 AM] [semantic-release] › ✔  Loaded plugin "verifyConditions" from "@semantic-release/git"
  semantic-release:plugins options for @semantic-release/commit-analyzer/analyzeCommits: {} +0ms
[7:40:00 AM] [semantic-release] › ✔  Loaded plugin "analyzeCommits" from "@semantic-release/commit-analyzer"
  semantic-release:plugins options for @semantic-release/release-notes-generator/generateNotes: {} +1ms
[7:40:00 AM] [semantic-release] › ✔  Loaded plugin "generateNotes" from "@semantic-release/release-notes-generator"
  semantic-release:plugins options for @semantic-release/changelog/prepare: { changelogFile: 'CHANGELOG.md', changelogTitle: 'CHANGELOG' } +0ms
[7:40:00 AM] [semantic-release] › ✔  Loaded plugin "prepare" from "@semantic-release/changelog"
  semantic-release:plugins options for @semantic-release/npm/prepare: {} +0ms
[7:40:00 AM] [semantic-release] › ✔  Loaded plugin "prepare" from "@semantic-release/npm"
  semantic-release:plugins options for @semantic-release/git/prepare: {} +8ms
[7:40:00 AM] [semantic-release] › ✔  Loaded plugin "prepare" from "@semantic-release/git"
  semantic-release:plugins options for @semantic-release/npm/publish: {} +3ms
[7:40:00 AM] [semantic-release] › ✔  Loaded plugin "publish" from "@semantic-release/npm"
[7:40:00 AM] [semantic-release] › ℹ  This test run was triggered on the branch develop, while semantic-release is configured to only publish from master, therefore a new version won’t be published.
✨  Done in 0.63s.

Either local or CI, does not generate.

You can also check the whole project setup: https://github.com/raulfdm/generator-react-component-library

Cheers!

CHANGELOG.md not getting created/generated

I know there has been a number of these issues on here, but none of those answer my question / fix my problem.

It used to work, but in the process of testing out configurations now all of a sudden, it's not working. It doesn't create the CHANGELOG.md file. However, all the other plugins seem to work fine.

Here you can see the log output of semantic-release along with its associated configuration.

.releaserc.yaml:

branches:
  - master
repositoryUrl: https://github.com/emme1444/analyst-test4.git
plugins:
  - "@semantic-release/commit-analyzer":
    preset: conventionalcommits
  - "@semantic-release/release-notes-generator":
    preset: conventionalcommits
  - "@semantic-release/changelog"
  - "semantic-release-dart"
  - "@semantic-release/git":
    assets:
      - "CHANGELOG.md"
      - "pubspec.yaml"
      - "pubspec.lock"
dryRun: false
debug: true

debug output of semantic-release:

[9:48:37 AM] [semantic-release] › ℹ  Running semantic-release version 17.3.6
[9:48:37 AM] [semantic-release] › ✔  Loaded plugin "verifyConditions" from "@semantic-release/changelog"
[9:48:37 AM] [semantic-release] › ✔  Loaded plugin "analyzeCommits" from "@semantic-release/commit-analyzer"
[9:48:37 AM] [semantic-release] › ✔  Loaded plugin "prepare" from "@semantic-release/changelog"
[9:48:37 AM] [semantic-release] › ✔  Loaded plugin "prepare" from "semantic-release-dart"
[9:48:39 AM] [semantic-release] › ✔  Run automated release from branch master on repository https://github.com/emme1444/analyst-test4.git
[9:48:39 AM] [semantic-release] › ✔  Allowed to push to the Git repository
[9:48:39 AM] [semantic-release] › ℹ  Start step "verifyConditions" of plugin "@semantic-release/changelog"
[9:48:39 AM] [semantic-release] › ✔  Completed step "verifyConditions" of plugin "@semantic-release/changelog"
[9:48:39 AM] [semantic-release] › ℹ  No git tag version found on branch master
[9:48:39 AM] [semantic-release] › ℹ  No previous release found, retrieving all commits
[9:48:39 AM] [semantic-release] › ℹ  Found 1 commits since last release
[9:48:39 AM] [semantic-release] › ℹ  Start step "analyzeCommits" of plugin "@semantic-release/commit-analyzer"
[9:48:39 AM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ  Analyzing commit: fix: initial commit
[9:48:39 AM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ  The release type for the commit is patch
[9:48:39 AM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ  Analysis of 1 commits complete: patch release
[9:48:39 AM] [semantic-release] › ✔  Completed step "analyzeCommits" of plugin "@semantic-release/commit-analyzer"
[9:48:39 AM] [semantic-release] › ℹ  There is no previous release, the next release version is 1.0.0
[9:48:39 AM] [semantic-release] › ℹ  Start step "prepare" of plugin "@semantic-release/changelog"
[9:48:39 AM] [semantic-release] › ✔  Completed step "prepare" of plugin "@semantic-release/changelog"
[9:48:39 AM] [semantic-release] › ℹ  Start step "prepare" of plugin "semantic-release-dart"
[9:48:39 AM] [semantic-release] [semantic-release-dart] › ℹ  Write version 1.0.0 to pubspec.yaml in /home/runner/work/analyst-test4/analyst-test4
[9:48:39 AM] [semantic-release] › ✔  Completed step "prepare" of plugin "semantic-release-dart"
[9:48:45 AM] [semantic-release] › ✔  Created tag v1.0.0
[9:48:45 AM] [semantic-release] › ✔  Published release 1.0.0 on default channel

As you can see it publishes the release (1.0.0). But in between 'ℹ Start step "prepare" of plugin "@semantic-release/changelog"' and '✔ Completed step "prepare" of plugin "@semantic-release/changelog"'; no logs are written to indicate whether a file was created/generated. In fact, in the cicd pipeline I added an ls -lah command to list the files in the current directory/workspace directory, and this is what that prints (no CHANGELOG.md):

ls -lah output:

total 56K
drwxr-xr-x 6 runner docker 4.0K Jan 21 09:47 .
drwxr-xr-x 3 runner docker 4.0K Jan 21 09:47 ..
drwxr-xr-x 8 runner docker 4.0K Jan 21 09:48 .git
drwxr-xr-x 3 runner docker 4.0K Jan 21 09:47 .github
-rw-r--r-- 1 runner docker  281 Jan 21 09:47 .gitignore
-rw-r--r-- 1 runner docker  545 Jan 21 09:47 .releaserc.yaml
-rw-r--r-- 1 runner docker  12K Jan 21 09:47 LICENSE
-rw-r--r-- 1 runner docker  478 Jan 21 09:47 README.md
-rw-r--r-- 1 runner docker   35 Jan 21 09:47 analysis_options.yaml
drwxr-xr-x 2 runner docker 4.0K Jan 21 09:47 example
drwxr-xr-x 2 runner docker 4.0K Jan 21 09:47 lib
-rw-r--r-- 1 runner docker  253 Jan 21 09:48 pubspec.yaml

I've tried stripping the configuration down, but can't seem to figure out where I went wrong.

Thanks for the help!

An in-range update of semantic-release is breaking the build 🚨

Version 15.9.7 of semantic-release was just published.

Branch Build failing 🚨
Dependency semantic-release
Current Version 15.9.6
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

semantic-release is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • continuous-integration/travis-ci/push: The Travis CI build could not complete due to an error (Details).

Release Notes v15.9.7

15.9.7 (2018-08-10)

Reverts

  • "fix: do not convert ssh repositoryUrl to https" (93377eb)
Commits

The new version differs by 1 commits.

  • 93377eb revert: "fix: do not convert ssh repositoryUrl to https"

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

replace travis with actions

Part of semantic-release/semantic-release#1692

Todos

  • delete .travis.yml
  • create .github/workflows/{test,release}.yml (copy from https://github.com/semantic-release/npm/tree/master/.github/workflows)
  • remove package-lock.json from .gitignore
  • delete .npmrc and .yarnrc
  • README
    • remove travis/codecov badges
    • add actions badge instead (replace REPO NAME HERE ;): [![Build Status](https://github.com/semantic-release/[REPO NAME HERE]/workflows/Test/badge.svg)](https://github.com/semantic-release/[REPO NAME HERE]/actions?query=workflow%3ATest+branch%3Amaster)
  • create package-json.lock
  • add to package.json:
    • test:ci script which doesn't run lint pre script

    • renovate config

         "renovate": {
           "extends": [
             "github>semantic-release/.github"
           ]
         }
      
  • update branch protection: remove required status by Travis and Codecov, add required status for "test" (wait for first build of PR)

Error in Travis CI: cannot find module '@semantic-release/changelog'

Maybe I am missing something, but in my library: https://github.com/talohana/ngx-storage-api I am using semantic-release.
I added @semantic-release/changelog just as described in the docs, locally the dry-run runs correctly but in the CI (travis-ci) environment I get:

An error occurred while running semantic-release: Error: Cannot find module '@semantic-release/changelog'
Require stack:
- /home/travis/build/talohana/ngx-storage-api/noop.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:965:15)
    at resolveFileName (/home/travis/build/talohana/ngx-storage-api/node_modules/resolve-from/index.js:29:39)
    at resolveFrom (/home/travis/build/talohana/ngx-storage-api/node_modules/resolve-from/index.js:43:9)
    at module.exports (/home/travis/build/talohana/ngx-storage-api/node_modules/resolve-from/index.js:46:47)
    at loadPlugin (/home/travis/build/talohana/ngx-storage-api/node_modules/semantic-release/lib/plugins/utils.js:51:82)
    at /home/travis/build/talohana/ngx-storage-api/node_modules/semantic-release/lib/plugins/index.js:17:37
    at Array.reduce (<anonymous>)
    at module.exports (/home/travis/build/talohana/ngx-storage-api/node_modules/semantic-release/lib/plugins/index.js:14:34)
    at module.exports (/home/travis/build/talohana/ngx-storage-api/node_modules/semantic-release/lib/get-config.js:92:35)
    at async module.exports (/home/travis/build/talohana/ngx-storage-api/node_modules/semantic-release/index.js:257:32) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [ '/home/travis/build/talohana/ngx-storage-api/noop.js' ]
}

Relevant files:

release.config.js:

module.exports = {
  plugins: [
    '@semantic-release/commit-analyzer',
    '@semantic-release/release-notes-generator',
    '@semantic-release/changelog',
    '@semantic-release/git',
    [
      '@semantic-release/npm',
      {
        pkgRoot: 'dist/ngx-storage-api',
      },
    ],
  ],
};

.travis.yml:

language: node_js

node_js:
  - lts/*

notifications:
  email:
    on_success: never
    on_failure: always

install:
  - npm install -g codecov

script:
  - npm run test:ci
  - codecov
  - npm run package

jobs:
  include:
    # Define the release stage that runs semantic-release
    - stage: release
      node_js: lts/*
      # Advanced: optionally overwrite your default `script` step to skip the tests
      # script: skip
      deploy:
        provider: script
        skip_cleanup: true
        script:
          - npx semantic-release

package.json:

{
  "name": "ngx-storage-api",
  "version": "0.0.0-development",
  "private": true,
  "scripts": {
    "ng": "ng",
    "commit": "git-cz",
    "start:app": "ng serve ngx-storage-api-app",
    "test": "jest --config jest.config.js",
    "test:watch": "jest --config jest.config.js --watch",
    "test:ci": "jest --config jest.config.js --runInBand",
    "lint": "eslint . --ext .js,.ts",
    "lint:fix": "npm run lint -- --fix",
    "prettier": "prettier --write",
    "build:lib": "ng build --prod ngx-storage-api",
    "copy-files": "cp -t dist/ngx-storage-api README.md LICENSE",
    "package": "run-s clean build:lib copy-files",
    "clean": "rimraf dist",
    "semantic-release": "semantic-release"
  },
  "config": {
    "commitizen": {
      "path": "cz-conventional-changelog"
    }
  },
  "dependencies": {
    "@angular/animations": "~10.1.1",
    "@angular/common": "~10.1.1",
    "@angular/compiler": "~10.1.1",
    "@angular/core": "~10.1.1",
    "@angular/forms": "~10.1.1",
    "@angular/platform-browser": "~10.1.1",
    "@angular/platform-browser-dynamic": "~10.1.1",
    "@angular/router": "~10.1.1",
    "rxjs": "~6.6.0",
    "tslib": "^2.0.0",
    "zone.js": "~0.10.2"
  },
  "devDependencies": {
    "@angular-devkit/build-angular": "~0.1001.1",
    "@angular/cli": "~10.1.1",
    "@angular/compiler-cli": "~10.1.1",
    "@commitlint/cli": "^9.1.2",
    "@commitlint/config-conventional": "^9.1.2",
    "@semantic-release/changelog": "^5.0.1",
    "@semantic-release/git": "^9.0.0",
    "@types/jest": "^26.0.13",
    "@types/jest-when": "^2.7.1",
    "@types/node": "^12.11.1",
    "@typescript-eslint/eslint-plugin": "^4.1.0",
    "@typescript-eslint/parser": "^4.1.0",
    "codelyzer": "^6.0.0",
    "commitizen": "^4.2.1",
    "eslint": "^7.8.1",
    "eslint-config-prettier": "^6.11.0",
    "eslint-plugin-prettier": "^3.1.4",
    "husky": "^4.3.0",
    "jest": "^26.4.2",
    "jest-marbles": "^2.5.1",
    "jest-preset-angular": "^8.3.1",
    "jest-when": "^2.7.2",
    "lint-staged": "^10.3.0",
    "ng-packagr": "^10.1.0",
    "npm-run-all": "^4.1.5",
    "prettier": "^2.1.1",
    "rimraf": "^3.0.2",
    "semantic-release": "^17.1.1",
    "ts-node": "~8.3.0",
    "typescript": "~4.0.2"
  },
  "husky": {
    "hooks": {
      "commit-msg": "commitlint -E HUSKY_GIT_PARAMS",
      "pre-commit": "lint-staged"
    }
  },
  "repository": {
    "type": "git",
    "url": "https://github.com/talohana/ngx-storage-api.git"
  }
}

How to configure commit title triggers?

relevant part of .releaserc.json

"plugins": [
    [
      "@semantic-release/commit-analyzer",
      {
        "preset": "angular",
        "releaseRules": [
          {"type": "refactor", "release": "patch"},
          {"type": "perf", "release": "patch"},
          {"type": "build", "release": "patch"},
          {"type": "i18n", "release": "patch"},
          {"scope": "no-release", "release": false}
        ]
      }
    ],
    "@semantic-release/release-notes-generator",
    [
      "@semantic-release/changelog",
      {
        "changelogFile": "CHANGELOG.md",
        "changelogTitle": "# Changelog"
      }
    ],
    ...

As you can see I chose to trigger a release if a refactor commit is detected.
Is there a way to configure this plugin to let refactor commits be in the changelog?

Thanks

How to create the changelog in other location?

Hi everybody,

I am using your plugin but I have the problem that I cannot create the changelog.md in the same branch that is running semantic-release because of this needs to have PR. I need to create the file in other locations such as the wiki site. is there a way to do that?

Best
Hmendezm

Unable to run plugin on prepare hook

Hi,

Node: v10.0.0

Default configuration:

{
    "prepare": [
        "@semantic-release/changelog",
        "@semantic-release/npm",
        "@semantic-release/git"
    ],
    "verifyConditions": [
        "@semantic-release/changelog",
        "@semantic-release/npm",
        "@semantic-release/git",
        "@semantic-release/github"
    ]
}

Error:

[Semantic release]: An error occurred while running semantic-release: { TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received type undefined
    at assertPath (path.js:39:11)
    at Object.resolve (path.js:1090:7)
    at module.exports (.../node_modules/@semantic-release/changelog/lib/prepare.js:7:30)
    at prepare (.../node_modules/@semantic-release/changelog/index.js:25:9)
    at validator (.../node_modules/semantic-release/lib/plugins/normalize.js:46:28)
    at pReduce (.../node_modules/semantic-release/lib/plugins/pipeline.js:37:40)
    at Promise.all.then.value (.../node_modules/p-reduce/index.js:16:10)

Seems to be related to missing cwd property on context argument.

Plugin not being loaded or run

I'm trying to add @semantic-release/changelog to a test repo before implementing it in a production repo. However, I'm having issues even getting it to load.

Here is my config for semantic-release in package.json:

"release": {
"branch": "master",
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
["@semantic-release/changelog", {
"changelogFile": "docs/CHANGELOG.md"
}],
[
"@semantic-release/git",
{
"assets": [
"docs/CHANGELOG.md"
]
}
],
"@semantic-release/npm",
"@semantic-release/github"
]
},

This is the output I am getting when running semantic-release locally without a CI environment.

`
[4:55:55 PM] [semantic-release] › ℹ Running semantic-release version 15.9.16
[4:55:55 PM] [semantic-release] › ✔ Loaded plugin "verifyConditions" from "@semantic-release/npm"
[4:55:55 PM] [semantic-release] › ✔ Loaded plugin "verifyConditions" from "@semantic-release/github"
[4:55:55 PM] [semantic-release] › ✔ Loaded plugin "analyzeCommits" from "@semantic-release/commit-analyzer"
[4:55:55 PM] [semantic-release] › ✔ Loaded plugin "generateNotes" from "@semantic-release/release-notes-generator"
[4:55:55 PM] [semantic-release] › ✔ Loaded plugin "prepare" from "@semantic-release/npm"
[4:55:55 PM] [semantic-release] › ✔ Loaded plugin "publish" from "@semantic-release/npm"
[4:55:55 PM] [semantic-release] › ✔ Loaded plugin "publish" from "@semantic-release/github"
[4:55:55 PM] [semantic-release] › ✔ Loaded plugin "success" from "@semantic-release/github"
[4:55:55 PM] [semantic-release] › ✔ Loaded plugin "fail" from "@semantic-release/github"
[4:55:55 PM] [semantic-release] › ✔ Run automated release from branch master
[4:56:00 PM] [semantic-release] › ✔ Allowed to push to the Git repository
[4:56:00 PM] [semantic-release] › ℹ Start step "verifyConditions" of plugin "@semantic-release/npm"
[4:56:00 PM] [semantic-release] [@semantic-release/npm] › ℹ Verify authentication for registry https://registry.npmjs.org/
[4:56:01 PM] [semantic-release] › ✔ Completed step "verifyConditions" of plugin "@semantic-release/npm"
[4:56:01 PM] [semantic-release] › ℹ Start step "verifyConditions" of plugin "@semantic-release/github"
[4:56:01 PM] [semantic-release] [@semantic-release/github] › ℹ Verify GitHub authentication
[4:56:02 PM] [semantic-release] › ✔ Completed step "verifyConditions" of plugin "@semantic-release/github"
[4:56:03 PM] [semantic-release] › ℹ Found git tag v1.12.0 associated with version 1.12.0
[4:56:03 PM] [semantic-release] › ℹ Found 1 commits since last release
[4:56:03 PM] [semantic-release] › ℹ Start step "analyzeCommits" of plugin "@semantic-release/commit-analyzer"
[4:56:03 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ Analyzing commit: feat(laksjdf): asl;dfkj

asldkfj
[4:56:03 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ The release type for the commit is minor
[4:56:03 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ Analysis of 1 commits complete: minor release
[4:56:03 PM] [semantic-release] › ✔ Completed step "analyzeCommits" of plugin "@semantic-release/commit-analyzer"
[4:56:03 PM] [semantic-release] › ℹ The next release version is 1.13.0
[4:56:03 PM] [semantic-release] › ℹ Start step "generateNotes" of plugin "@semantic-release/release-notes-generator"
[4:56:03 PM] [semantic-release] › ✔ Completed step "generateNotes" of plugin "@semantic-release/release-notes-generator"
[4:56:03 PM] [semantic-release] › ℹ Start step "prepare" of plugin "@semantic-release/npm"
[4:56:03 PM] [semantic-release] [@semantic-release/npm] › ℹ Write version 1.13.0 to package.json in /Users/jbahr/Documents/test/change-log-release-branch-test
v1.13.0
[4:56:03 PM] [semantic-release] › ✔ Completed step "prepare" of plugin "@semantic-release/npm"
[4:56:07 PM] [semantic-release] › ✔ Created tag v1.13.0
[4:56:07 PM] [semantic-release] › ℹ Start step "publish" of plugin "@semantic-release/npm"
[4:56:07 PM] [semantic-release] [@semantic-release/npm] › ℹ Publishing version 1.13.0 to npm registry
npm notice
npm notice 📦 @jbahr/[email protected]
npm notice === Tarball Contents ===
npm notice 4.3kB package.json
npm notice 35.1kB LICENSE
npm notice 113B README.md
npm notice === Tarball Details ===
npm notice name: @jbahr/changelogtest
npm notice version: 1.13.0
npm notice package size: 13.9 kB
npm notice unpacked size: 39.6 kB
npm notice shasum: 3f9ffeba865f44b8f204ba8884b1c1db9ab1e8af
npm notice integrity: sha512-l/8R70V4QRcjl[...]Z+NJczqFgKqYQ==
npm notice total files: 3
npm notice

  • @jbahr/[email protected]
    [4:56:12 PM] [semantic-release] [@semantic-release/npm] › ℹ Published @jbahr/[email protected] on https://registry.npmjs.org/
    [4:56:13 PM] [semantic-release] › ✔ Completed step "publish" of plugin "@semantic-release/npm"
    [4:56:13 PM] [semantic-release] › ℹ Start step "publish" of plugin "@semantic-release/github"
    [4:56:13 PM] [semantic-release] [@semantic-release/github] › ℹ Published GitHub release: https://github.com/joshuabahr/change-log-release-branch-test/releases/tag/v1.13.0
    [4:56:13 PM] [semantic-release] › ✔ Completed step "publish" of plugin "@semantic-release/github"
    [4:56:13 PM] [semantic-release] › ℹ Start step "success" of plugin "@semantic-release/github"
    [4:56:16 PM] [semantic-release] › ✔ Completed step "success" of plugin "@semantic-release/github"
    [4:56:16 PM] [semantic-release] › ✔ Published release 1.13.0
    `
    A new release is being released on github and npm, but the @semantic-release/changelog plugin is not being run. As far as I can tell, it's not even being loaded.

Gitlab Error: Cannot find module '@semantic-release/changelog'

semantic-release fails with the ominous Error: Cannot find module '@semantic-release/changelog' in Gitlab CI.

Gitlab CI config:

image: node:16.14.2

stages:
  - build
  - test
  - release

variables:
  npm_config_cache: '$CI_PROJECT_DIR/.npm'

.dependencies_cache:
  cache:
    key:
      files:
        - package-lock.json
    paths:
      - .npm
      - node_modules
    policy: pull

setup:
  stage: build
  script:
    - npm ci --cache .npm --prefer-offline
  extends: .dependencies_cache
  cache:
    policy: pull-push
  artifacts:
    paths:
      - node_modules
  only:
    changes:
      - package-lock.json

lint:
  stage: test
  script:
    - npm run lint
  cache:
    key:
    paths:
      - cache
    policy: pull-push
  artifacts:
    paths:
      - cache

audit:
  stage: test
  script:
    - npm audit

publish:
  stage: release
  script:
    - npx semantic-release
  needs: ['lint', 'audit']

semantic-release config:

module.exports = {
  plugins: [
    '@semantic-release/commit-analyzer',
    '@semantic-release/release-notes-generator',
    '@semantic-release/changelog',
    '@semantic-release/gitlab',
    '@semantic-release/git',
  ],
  release: {
    extends: '@semantic-release/gitlab-config',
    prepare: [
      '@semantic-release/changelog',
      {
        path: '@semantic-release/git',
        assets: ['package.json', 'package-lock.json', 'CHANGELOG.md'],
        message:
          'chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}',
      },
    ],
  },
}

Relevant packages from devDependencies:

  "devDependencies": {
    "@semantic-release/changelog": "^6.0.1",
    "@semantic-release/git": "^10.0.1",
    "@semantic-release/gitlab": "^7.0.4",
    "@semantic-release/gitlab-config": "^10.0.0",
    "semantic-release": "^19.0.2",
  }

gitlab and changelog duplication

Hi,

I'm using a semantic-release with gitlab and changelog plugins.

GitLab project set Merge Method to "Merge commit".

If one user creates an MR and the other one approve and merge it - I get 2 entries in the changelog: one for the author and one for the merger.

Any hints on how to avoid it?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.