0

我已经设置了变量,但它似乎不起作用。

在此处输入图像描述

语义日志显示它正在使用@semantic-release/github,但实际上我的仓库在gitlab中,是这个原因吗?顺便说一句,我已经安装了@semantic-release/gitlab puglin

[semantic-release] › ℹ 插件“@semantic-release/github”的启动步骤“verifyConditions”

其他设置在这里:

//.npmrc:

registry=https://registry.npmjs.org/

//gitlab.com/api/v4/packages/npm/:_authToken=${CI_JOB_TOKEN}

//gitlab.com/api/v4/projects/${CI_PROJECT_ID}/packages/npm/:_authToken=${CI_JOB_TOKEN}

releaserc.json:


{
  "branches": ["master"],
  "plugins": [
    "@semantic-release/commit-analyzer",
    "@semantic-release/release-notes-generator",
    "@semantic-release/gitlab",
    "@semantic-release/npm",
    [
      "@semantic-release/git",
      {
        "assets": ["package.json"],
        "message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
      }
    ]
  ]
}


4

1 回答 1

0

我的第一个猜测是,releaserc.json当您调用semantic-release.

我基于您在问题中说语义发布使用@semantic-release/github插件的事实,该插件在没有提供替代配置时默认运行semantic-release

您可以尝试 GitLab 中的以下教程,以找出事情的转折点:https ://docs.gitlab.com/ee/ci/examples/semantic-release.html

于 2021-08-28T18:47:30.793 回答