admin管理员组

文章数量:1293237

The semantic-release documentation describes how to define the plugins field within the semantic-release configuration (e.g. .releaserc). Here's an example of a .releaserc file that I'm using in one of my projects:

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

I've also seen a slightly different style of configuration that looks like this:

{
  "branches": [
    "main"
  ],
  "verifyConditions": [
    "@semantic-release/changelog",
    "@semantic-release/npm",
    "@semantic-release/git"
  ],
  "prepare": [
    "@semantic-release/changelog",
    "@semantic-release/npm",
    "@semantic-release/git"
  ],
  "publish": [
    [
      "@semantic-release/npm",
      {
        "pkgRoot": "dist"
      }
    ],
    {
      "path": "@semantic-release/github"
    }
  ]
}

Here, instead of the plugins field, there are fields named after some of the release steps (verifyConditions, prepare, and publish). I can't seem to find where this alternate style is documented. Where can I find docs about this?

Also, I'd like to understand what this means underneath the publish field:

    {
      "path": "@semantic-release/github"
    }

where is this documented?

Thanks in advance for any help!

本文标签: Question about semanticrelease configuration stylesStack Overflow