在标签 CircleCI 上触发构建脚本

Triggering a build script on tag CircleCI

我试图在标记提交时触发构建任务,但是,我无法使其工作,理想情况下,这会执行任务并在发布文件夹中创建构建文件夹,而不是在分支中。

注意我没有尝试部署到任何外部。

我的配置是这样的

 test:
  override:
  - yarn test
 deployment:
  release:
   tag: /v[0-9]+(\.[0-9]+)*/
   owner: ORGNAME
  override:
   - yarn run build

有什么想法吗???

来自https://circleci.com/docs/1.0/configuration/#tags

Normally, pushing a tag will not run a build. If there is a deployment configuration with a tag property that matches the name of the tag you created, we will run the build and the deployment section that matches.

将标签添加到 deployment 部分的任务后,构建将 运行 正常进行。如果您不想为该标签做任何特定的事情,则不要添加 command.

所以:

 compile:
   override:
     - yarn run build
 test:
   override:
     - yarn test
 deployment:
   release:
     tag: /v[0-9]+(\.[0-9]+)*/
     owner: ORGNAME