1

我正在使用语义释放库,这是我的 release.config.js:

require('dotenv').config();

module.exports = {
  branch: 'rel',
  dryRun: false,
  debug: true,
  repositoryUrl: 'https://github.xxx.com/xxx/backend',
  githubUrl: 'https://github.ibm.com/',
  githubApiPathPrefix: '/api/v3',
  verifyConditions: ['@semantic-release/github', '@semantic-release/changelog'],
  verifyRelease: [],
  publish: ['@semantic-release/github'],
  prepare: ['@semantic-release/changelog'],
  success: ['@semantic-release/github'],
  generateNotes: ['@semantic-release/release-notes-generator'],
  fail: ['@semantic-release/github'],
  plugins: [
    '@semantic-release/commit-analyzer',
    ['@semantic-release/changelog', {
      changelogFile: 'docs/CHANGELOG.md',
    }],
    ['@semantic-release/github', {

    }],
  ],
  preset: 'angular',
};

如您所见,我将 rel 分支设置为生成语义发布的分支,它工作正常,但只要我将上述内容更改为

   require('dotenv').config();
    module.exports = {
      branches: ['(rel|release|Relite)?(-[0-9]\.[0-9]\.[0-9]+)','rel'],
      ...

为了生成任何分支名称的发布,例如:rel-1.0.0 或 release-1.3.4 或 rel。例如,我在 rel-1.0.2 中,我收到一条消息,说语义发布设置为 master,因此它不会生成发布

This test run was triggered on the branch rel-1.0.0, while semantic-release is configured to only publish from master, therefore a new version won’t be published.

任何人都可以帮忙吗?

4

1 回答 1

0

在再次测试之前,尝试在包含您发布配置的文件上提交更改。

于 2021-05-21T16:13:28.753 回答